Don't leak the fd to child processes.

Tue, 12 Aug 2008 23:16:58 +0000

author
Daniel Atallah <datallah@pidgin.im>
date
Tue, 12 Aug 2008 23:16:58 +0000
changeset 24041
1cfd1986dbc3
parent 24040
24ff94bfd09d
child 24042
098a3f96a0b9

Don't leak the fd to child processes.

libpurple/protocols/oscar/peer.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/oscar/peer.c	Tue Aug 12 23:09:05 2008 +0000
+++ b/libpurple/protocols/oscar/peer.c	Tue Aug 12 23:16:58 2008 +0000
@@ -636,6 +636,10 @@
 
 	flags = fcntl(conn->fd, F_GETFL);
 	fcntl(conn->fd, F_SETFL, flags | O_NONBLOCK);
+#ifndef _WIN32
+	fcntl(conn->fd, F_SETFD, FD_CLOEXEC);
+#endif
+
 	purple_input_remove(conn->watcher_incoming);
 
 	peer_connection_finalize_connection(conn);

mercurial