• 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
Re: SIGPIPE and SIG_IGN
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SIGPIPE and SIG_IGN


  • Subject: Re: SIGPIPE and SIG_IGN
  • From: Glenn Anderson <email@hidden>
  • Date: Tue, 19 Jun 2007 13:10:49 +1200

Title: Re: SIGPIPE and SIG_IGN
At 5:30 pm -0700 18/6/2007, Terry Lambert wrote:
This also means that the signal will not get sent if you are ignoring it, and it's in your process signal mask (sigaction() is generally preferred to calling signal(), but either should work).

Near the end of signal.h there is this:
/*
 *    signals delivered on a per-thread basis.
 */

#define threadmask (sigmask(SIGILL)|sigmask(SIGTRAP)|\
                   sigmask(SIGIOT)|sigmask(SIGEMT)|\
               sigmask(SIGFPE)|sigmask(SIGBUS)|\
               sigmask(SIGSEGV)|sigmask(SIGSYS)|\
              sigmask(SIGPIPE))

Is this not true?

It is has been my experience that if you want to ignore SIGPIPE, you have to ignore it on every thread that could trigger it (ie: call signal(SIGPIPE, SIG_IGN) on every thread that writes to sockets that could close), you can't just ignore it for the whole process.

Glenn.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: SIGPIPE and SIG_IGN
      • From: Terry Lambert <email@hidden>
References: 
 >SIGPIPE and SIG_IGN (From: email@hidden)
 >Re: SIGPIPE and SIG_IGN (From: Glenn Anderson <email@hidden>)
 >Re: SIGPIPE and SIG_IGN (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: SIGPIPE and SIG_IGN
  • Next by Date: Re: SIGPIPE and SIG_IGN
  • Previous by thread: Re: SIGPIPE and SIG_IGN
  • Next by thread: Re: SIGPIPE and SIG_IGN
  • Index(es):
    • Date
    • Thread