]> git.sesse.net Git - cubemap/blobdiff - client.cpp
Fix various close-on-exec bugs.
[cubemap] / client.cpp
index 26806d6fdcf53d88a2ae758adbbbce7c10e1b214..5d5c179be0e6df019930fb2924cf22be2e7bcab1 100644 (file)
@@ -72,7 +72,7 @@ Client::Client(const ClientProto &serialized, const vector<shared_ptr<const stri
 {
        // Set back the close-on-exec flag for the socket.
        // (This can't leak into a child, since we haven't been started yet.)
-       fcntl(sock, F_SETFD, 1);
+       fcntl(sock, F_SETFD, O_CLOEXEC);
 
        if (stream != nullptr) {
                if (setsockopt(sock, SOL_SOCKET, SO_MAX_PACING_RATE, &stream->pacing_rate, sizeof(stream->pacing_rate)) == -1) {