On Wed, Mar 19, 2003 at 11:30:02AM +0200, Peter Pentchev wrote:
...
> dnscache) getting a SIGPIPE when attempting to write to an incoming
> connection's socket.  Presumably, the client closed the connection in
...
> The question: if the client closed the socket, shouldn't a write(2)
> return -1 with errno == EPIPE before sending a SIGPIPE?  Does anyone

well, what would "before" mean ? the system sends a signal when
the error is detected, not after an arbitrary amount of time
to give the user a chance of handling the return from the syscall.

Sounds like the correct approach is to set the handler for
SIGPIPE to sig_ign

Maybe one should wonder why this is not just the default given
that you can get this signal not because your program
did something wrong, but because the other end did.

        cheers
        luigi


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to