1. [Linux] Broken Pipe Error
Does anyone know what sorts of things will cause a "broken pipe error" when
dealing with
Linux sockets? I am assuming it is the write function but I have no way of
detecting,
catching, blocking or ignoring the SIGPIPE signal.
My server is crashing at random intervals and I cannot seem to find a reason for
it. Is
there anyway to test a socket connection before trying to write to it?
Any help will be greatly appreciated, as I am about at my wits' end.
Kayhlan
2. Re: [Linux] Broken Pipe Error
- Posted by cense <cense at MAIL.RU>
Nov 14, 2000
-
Last edited Nov 15, 2000
On Tue, 14 Nov 2000, Kayhlan wrote:
>> Does anyone know what sorts of things will cause a "broken pipe error" when
>> dealing with
>> Linux sockets? I am assuming it is the write function but I have no way of
>> detecting,
>> catching, blocking or ignoring the SIGPIPE signal.
>>
>> My server is crashing at random intervals and I cannot seem to find a reason
>> for it. Is
>> there anyway to test a socket connection before trying to write to it?
>>
>> Any help will be greatly appreciated, as I am about at my wits' end.
>>
>> Kayhlan
Hello again Kayhlan,
The "broken pipe error" just means that the socket connection has been broken.
The communication between two sockets is done through a pipe and when that pipe
breaks, so does the connection.
This sounds rather similar to a problem i was having quite some time ago with
a perl script that used linux sockets. I dont know for sure about your problem
but i *think* that my problem (of similar nature) could have been due to the
fact that i was sending data before the other side of my connection was
replying to previous data. I dont know this for sure but now that you have
brought this up, i will investigate again. Now i dont know why this would
cause a pipe break because i was pretty sure TCP protected against this in some
ways but then again, im no TCP/IP expert or anything of the sorts.
Im going to try and find a solution now myself so then maybe i might be able to
be of a little more assistance to you and my ex-perlscript.
Dont give up :)
--
evil, corruption and bad taste
^[cense]