changeset 23710:239ee71307c6

Don't leak the fd to child processes.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 12 Aug 2008 23:16:58 +0000
parents 7f401e99f9d9
children 2a8af2ed4b49
files libpurple/protocols/oscar/peer.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);