]> git.sesse.net Git - cubemap/blobdiff - acceptor.cpp
Fix various close-on-exec bugs.
[cubemap] / acceptor.cpp
index 2fef9148d9a4a93114986a11eadbcf590dbcb463..31901dd8406c97c39d97dc9b3310dedb4f37a18e 100644 (file)
@@ -104,7 +104,7 @@ Acceptor::Acceptor(const AcceptorProto &serialized)
 {
        // 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(server_sock, F_SETFD, 1);
+       fcntl(server_sock, F_SETFD, O_CLOEXEC);
 }
 
 AcceptorProto Acceptor::serialize() const