]> git.sesse.net Git - cubemap/blobdiff - udpinput.cpp
Fix various close-on-exec bugs.
[cubemap] / udpinput.cpp
index ecd099a529913250b99531f4427fa6c56ec6d91f..873b0b952911a226d8f08255f80e2d092e163801 100644 (file)
@@ -123,7 +123,7 @@ UDPInput::UDPInput(const InputProto &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(sock, F_SETFD, 1);
+       fcntl(sock, F_SETFD, O_CLOEXEC);
 
        // Should be verified by the caller.
        string protocol;