• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
A strange error happen when open socket
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A strange error happen when open socket


  • Subject: A strange error happen when open socket
  • From: Robin <email@hidden>
  • Date: Thu, 26 Oct 2006 18:01:05 +0800

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, &currentSignalState);
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

 _______________________________________________
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

  • Follow-Ups:
    • Re: A strange error happen when open socket
      • From: Quinn <email@hidden>
  • Prev by Date: Re: crash in CFReadStreamOpen when called from secondary thread
  • Next by Date: Re: A strange error happen when open socket
  • Previous by thread: Re: Getting your Gateway IP Address
  • Next by thread: Re: A strange error happen when open socket
  • Index(es):
    • Date
    • Thread