Blocking SIGPIPE.
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