]> git.sesse.net Git - vlc/commitdiff
Another close-on-exec
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 28 Apr 2006 12:30:39 +0000 (12:30 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 28 Apr 2006 12:30:39 +0000 (12:30 +0000)
src/network/tcp.c

index 3b088dcd6949b170a915b18b759d6cc1ed17dc6a..23b30f15795559e2ae6a698d7c5096865456acf5 100644 (file)
@@ -423,6 +423,9 @@ int __net_Accept( vlc_object_t *p_this, int *pi_fd, mtime_t i_wait )
             }
             else
             {
+#ifdef FD_CLOEXEC
+                fcntl( i_fd, F_SETFD, FD_CLOEXEC );
+#endif
                 /*
                  * This round-robin trick ensures that the first sockets in
                  * pi_fd won't prevent the last ones from getting accept'ed.