Re: How to use GIOChannel to read an Unix socket

2010-01-27 Thread Robert Pearce
Hi silverburgh, On Tue, 26 Jan 2010 23:59:11 -0800 you wrote: I have updated my gio_read_socket per your advice. No you haven't. Chris explicitly said you need to free the GIOChannel objectand that using g_io_channel_shutdown of itself is not sufficient. I quote: Actually, you have

Re: How to use GIOChannel to read an Unix socket

2010-01-27 Thread Chris Vine
On Tue, 26 Jan 2010 23:59:11 -0800 silverburgh silverburgh.me...@gmail.com wrote: I have updated my gio_read_socket per your advice. But when the other end closes the socket (the GIOChannel* gio ties to that socket), I get a segmentation fault. I think some how when I call gio_shutdown, it

Re: How to use GIOChannel to read an Unix socket

2010-01-26 Thread silverburgh
Chris, I have updated my gio_read_socket per your advice. But when the other end closes the socket (the GIOChannel* gio ties to that socket), I get a segmentation fault. I think some how when I call gio_shutdown, it ends up calling gio_read_socket again, and it crashes with a Segmentation fault.

How to use GIOChannel to read an Unix socket

2010-01-24 Thread silverburgh
Hi, I create a GIOChannel which wraps around a socket on linux: GIOChannel* channel = g_io_channel_unix_new(sock); g_io_add_watch(channel, G_IO_IN, gio_read_socket, NULL)); g_io_add_watch(channel, G_IO_HUP, gio_close_socket, NULL)); And my

Re: How to use GIOChannel to read an Unix socket

2010-01-24 Thread Chris Vine
On Sun, 24 Jan 2010 00:02:49 -0800 silverburgh silverburgh.me...@gmail.com wrote: Hi, I create a GIOChannel which wraps around a socket on linux: GIOChannel* channel = g_io_channel_unix_new(sock); g_io_add_watch(channel, G_IO_IN, gio_read_socket, NULL));