g_io_channel_write_chars() and closed socket



Hi everyone.

I have tried to find a way to fix that problem with no luck at all. This
is a simple server, you connect to it with `telnet localhost 10202` and
it prints a text. If you quit telnet with CTRL SHIFT 5, the server quits
with SIGPIPE :

Program received signal SIGPIPE, Broken pipe.
0x4010d908 in write () from /lib/libc.so.6
(gdb) bt
#0  0x4010d908 in write () from /lib/libc.so.6
#1  0x401f3398 in g_io_watch_funcs () from /usr/lib/libglib-2.0.so.0
#2  0x40196701 in g_io_channel_write_chars () from /usr/lib/libglib-2.0.so.0
#3  0x08048abc in BxSr_sendline (buffer=0x8048caa "something to say\n") at server.c:55
#4  0x08048a3c in main (argc=1, argv=0xbffff9a4) at server.c:36

Is there a way to know the client quited ? I don't see anyway (and I
don't want to use signal().

Any links/urls would be appreciated.


-- 
Fabien Penso
http://penso.info/
http://team.linuxfr.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]