• 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
preventing delivery of Signals.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

preventing delivery of Signals.


  • Subject: preventing delivery of Signals.
  • From: Eric Seidel <email@hidden>
  • Date: Thu, 14 Feb 2002 09:43:34 +0100

Any ideas how to prevent delivery of a SIGPIPE signal to a process?

I have a place in my code where I call write() or send() to send over a socket... and as expected, I occasionally get a SIGPIPE when the boso on the other end has closed the connection already.

The problem arises that I have a multithreaded application (only 2 threads) and the SIGPIPE signal seems to get delivered to the PROCESS and not the THREAD.

when I tried signal(SIGPIPE, SIG_IGR) or sigignore(SIGPIPE), or even sigaction(...) to ignore the signal from one thread, it still got delivered... and I got stopped in the debugger.

when I tried to use those from BOTH threads, I STILL seem to get the signal delivered, and thus stopped in the debugger.

Any way anyone knows to stop the creation or delivery of a signal to a process? Or... an alternative to write/send that will not throw a signal every time it encounters what would cause a SIGPIPE....

(I am watching the return code of write/send anyway.. and closing the connection if it's anything but 0... that should be just fine..., I just need to get rid of this signal!)

Thanks.

-eric
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: preventing delivery of Signals.
      • From: Marcel Weiher <email@hidden>
  • Prev by Date: performZoom: in awakeFromNib
  • Next by Date: Seemingly ridiculous problem...
  • Previous by thread: Re: performZoom: in awakeFromNib
  • Next by thread: Re: preventing delivery of Signals.
  • Index(es):
    • Date
    • Thread