Date: Thu, 8 Jan 2004 14:27:42 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: rmkml <rmkml@wanadoo.fr> Cc: freebsd-hackers@freebsd.org Subject: Re: problem with signal handling and threads (fbsd49R) Message-ID: <Pine.GSO.4.10.10401081425300.24459-100000@pcnet5.pcnet.com> In-Reply-To: <Pine.LNX.4.58.0401081916290.12240@hp.mgn.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10401081425300.24459-100000>