Re: g_io_channel_write_chars() and closed socket



Bonjour Brian !

Tue, 03 Aug 2004 17:37:49 -0400, tu as dit : 

i've noticed this happen on linux before - it seems the kernel sends the
process a SIGPIPE if the socket gets unexpectedly closed.  easy fix is
to do:
signal(SIGPIPE, SIG_IGN);
near the beginning of your main() function (you'll need to include
signal.h).  this will cause your app to ignore the PIPE signal, and not
quit.  make sure you check for any errors returned from
g_io_channel_write_chars() to see if the write succeeded or failed.

Well I was hoping to not having to use such a fix. I guess I will have
to if I want this to work.

I also think Linux is not the only one impacted. Did someone try that
program on BSD or other Unix ?



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