NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

NetBSD and sigaction(2)



Hi, I have a small test program that needs to ignore SIGPIPE

This works when calling sigset() function:

sigset(SIGPIPE, SIG_IGN);


However if I try to do the same with sigaction(), for some reason
SIGPIPE is not ignored, and the test program terminates:

struct sigaction sigact;

sigact.sa_flags = 0;
sigact.sa_handler = SIG_IGN;
sigact.sa_sigaction = NULL;
sigemptyset(&sigact.sa_mask);

sigaction(SIGPIPE, &sigact, NULL);


Am I doing something wrong, or it's a problem with sigaction?


Home | Main Index | Thread Index | Old Index