Re: SIGPIPE and SIG_IGN
Re: SIGPIPE and SIG_IGN
- Subject: Re: SIGPIPE and SIG_IGN
- From: Glenn Anderson <email@hidden>
- Date: Tue, 19 Jun 2007 13:10:49 +1200
Title: Re: SIGPIPE and SIG_IGN
At 5:30 pm -0700 18/6/2007, Terry Lambert wrote:
This also means that the signal will not
get sent if you are ignoring it, and it's in your process signal mask
(sigaction() is generally preferred to calling signal(), but either
should work).
Near the end of signal.h there is this:
/*
* signals delivered on a
per-thread basis.
*/
#define threadmask
(sigmask(SIGILL)|sigmask(SIGTRAP)|\
sigmask(SIGIOT)|sigmask(SIGEMT)|\
sigmask(SIGFPE)|sigmask(SIGBUS)|\
sigmask(SIGSEGV)|sigmask(SIGSYS)|\
sigmask(SIGPIPE))
Is this not true?
It is has been my experience that if you want to ignore SIGPIPE,
you have to ignore it on every thread that could trigger it (ie: call
signal(SIGPIPE, SIG_IGN) on every thread that writes to sockets that
could close), you can't just ignore it for the whole process.
Glenn.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden