Call g_io_channel_set_close_on_unref() on the second half of the socket
authorJoe Shaw <joe@ximian.com>
Tue, 3 Dec 2002 19:12:36 +0000 (19:12 +0000)
committerJoe Shaw <joeshaw@src.gnome.org>
Tue, 3 Dec 2002 19:12:36 +0000 (19:12 +0000)
2002-12-03  Joe Shaw  <joe@ximian.com>

* libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
g_io_channel_set_close_on_unref() on the second half of the socket
pair so we don't leak file descriptors.

ChangeLog
libsoup/soup-ssl.c

index eb67ec1..674402d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-03  Joe Shaw  <joe@ximian.com>
+
+       * libsoup/soup-ssl.c (soup_ssl_get_iochannel_real): Call
+       g_io_channel_set_close_on_unref() on the second half of the socket
+       pair so we don't leak file descriptors.
+
 2002-12-03  Frank Belew         <frb@ximian.com>
 
        * libsoup/soup-address.c: add signal.h to the list of headers to 
index 1296ac3..455c707 100644 (file)
@@ -124,6 +124,7 @@ soup_ssl_get_iochannel_real (GIOChannel *sock, SoupSSLType type)
        fcntl (pair [1], F_SETFL, flags | O_NONBLOCK);
 
        new_chan = g_io_channel_unix_new (pair [1]);
+       g_io_channel_set_close_on_unref (new_chan, TRUE);
        g_io_add_watch (new_chan, G_IO_HUP | G_IO_ERR | G_IO_NVAL,
                        soup_ssl_hup_waitpid, GINT_TO_POINTER (pid));