Re: A strange error happen when open socket
Re: A strange error happen when open socket
- Subject: Re: A strange error happen when open socket
- From: Quinn <email@hidden>
- Date: Thu, 26 Oct 2006 11:16:20 +0100
At 18:01 +0800 26/10/06, Robin wrote:
/Cm-prj/MoreAuthSample/MoreUNIX/MoreUNIX.c:295: failed
assertion `currentSignalState.sa_handler == SIG_IGN'
MoreSecExecuteRequestInHelperTool requires that your process be
ignoring SIGPIPE. MoreAuthSample provides a helper routine,
MoreUNIXIgnoreSIGPIPE, that will do this for you. Justification:
1. If you don't ignore SIGPIPE, writing to a sockets whose other end
has been closed will generate a SIGPIPE. This is rarely useful, and
the MoreAuthSample code isn't set up to handle it. If you do ignore
SIGPIPE, this situation will generate an EPIPE error, which is much
more useful.
2. MoreSecExecuteRequestInHelperTool doesn't ignore SIGPIPE for you
because the state of SIGPIPE is global to your entire process. It's
generally bad for library code, like
MoreSecExecuteRequestInHelperTool, to modify the global state of the
process.
S+E
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden