Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A strange error happen when open socket



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:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden
References: 
 >A strange error happen when open socket (From: Robin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.