|
Posted by Konstantinos Agouros on March 29, 2008, 4:56 am
Please log in for more thread options
>>
>> I encountered a strange problem. I have an application that has a few
>> sockets open. To notify the other side that I am 'finished' I do a
>> shutdown on the socket. Because I am lazy I do a syswrite on the socket
>> after the shutdown which of course fails. However I found that the whole
>> childprocess doing this dies if I do the syswrite. This used not to happen.
>> The whole thing is on Gentoo Linux using perl 5.8.8.
>If you write to a socket (or pipe) which is closed, your process will be
>sent SIGPIPE. The default action for SIGPIPE is to terminate the
>process: this is useful in pipelines when the reading process exits
>early. You can ignore this signal, in which case the write will fail
>with EPIPE instead.
Indeed I did not ignore this signal. Strange that the same code used to
work before but thanks for the explanation.
Konstantin
>Ben
--
Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet: elwood@agouros.de
Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
----------------------------------------------------------------------------
"Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
|