• 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
Blocking SIGPIPE.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Blocking SIGPIPE.


  • Subject: Blocking SIGPIPE.
  • From: Robert Bell <email@hidden>
  • Date: Tue, 15 Sep 2009 10:41:45 -0700


Hi all,

Does anyone know why blocking SIGPIPE would be an issue in some applications? With 10.6, a simple application as shown below can block SIGPIPE, however, when embedded in a larger app which is using sockets and a variety of other things, SIGPIPE is not blocking. I can block other signals (such as SIGINT) with no issue. The same code had no problem in 10.5.

This application is compiled using gcc4.0 (min version 10.4). But is running under 10.6 and 10.6.1.

Thanks,

Robert.

#include <iostream>
#include <signal.h>

int main (int argc, char * const argv[]) {

    

sigset_t new_set, old_set;
sigemptyset(&new_set);
sigaddset(&new_set,SIGPIPE);


std::cout << "blocking SIGPIPE: " << sigprocmask(SIG_BLOCK,&new_set,&old_set) << std::endl;


while(true){
sleep(1);
}


    return 0;
}
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Blocking SIGPIPE.
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Re: No UNIX Development Tools on Snow Leopard
  • Next by Date: Re: Xcode 2.5 vs. 3.2 (was: Re: Any hope to get an updated Xcode IDE for Leopard?)
  • Previous by thread: Re: No UNIX Development Tools on Snow Leopard
  • Next by thread: Re: Blocking SIGPIPE.
  • Index(es):
    • Date
    • Thread