problem with signal handling and threads (fbsd49R)
Daniel Eischen
eischen at vigrid.com
Thu Jan 8 11:27:44 PST 2004
On Thu, 8 Jan 2004, rmkml wrote:
> please can you give me an example
> of mask to SET BLOCK ou UNBLOCK
> in both threads (main and run)
> in order to make this sample code working ?
man pthread_sigmask
sigset_t set;
sigemptyset(&set);
sigsetadd(&set, SIGINT);
pthread_sigmask(SIG_BLOCK, &set, NULL);
will block SIGINT. Put that in all threads that you don't
want to handle CTRL-C. sigprocmask() instead of pthread_sigmask()
will work as well.
More information about the freebsd-hackers
mailing list