Hi, all I met a very strange question in my Carbon application. What I'm doing is just like BSDLLCTest sample, I open a socket in the GetPFNDRVSocketTool and transfer the socket to the parent application by a descriptor.
But the error happen when carry out this function, err = MoreSecExecuteRequestInHelperTool(tool, auth, request, &response);
And, in this, // SIGPIPE occurs when you write to pipe or socket // whose other end has been closed. ----------------------------- #if MORE_DEBUG && MORE_UNIX_WRITE_CHECK_SIGPIPE { int junk; struct sigaction currentSignalState;
junk = sigaction(SIGPIPE, NULL, ¤tSignalState); assert(junk == 0);
assert( currentSignalState.sa_handler == SIG_IGN ); } #endif
------------------------------ The error is,
/Cm-prj/MoreAuthSample/MoreUNIX/MoreUNIX.c:295: failed assertion `currentSignalState.sa_handler == SIG_IGN' err = 32 result = 4
I checked the code with the example, I'm sure it's the same of this part. The error shows the socket is not opened. I do not know why it's not happen when run in the xcode IDE, but happen when run the application. And it does not happen when debug code.
Any help is grateful!
Best regards, Robin
|