Date: Sun, 8 Jul 2001 23:21:31 -0700 From: Jason Evans <jasone@canonware.com> To: Julian Elischer <julian@elischer.org> Cc: arch@freebsd.org Subject: Re: help needed in threads.. (Signals) Message-ID: <20010708232131.O8775@canonware.com> In-Reply-To: <3B494657.D3B7BF48@elischer.org>; from julian@elischer.org on Sun, Jul 08, 2001 at 10:51:19PM -0700 References: <3B494657.D3B7BF48@elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 08, 2001 at 10:51:19PM -0700, Julian Elischer wrote: > Can someone tell me if an alarm() call that sets an alarm signal for > some time in the futire (in a threaded environment, has teh signal delivered > to the process (an random thread), the same thread that made the request, > or a predesignated thread.. I just can't work out > what the right way to handle it in the code is.. > > posix? Bwahaha, signals and threads. Each thread has its own signal mask. A signal sent to the process is delivered to a thread that doesn't have the signal masked (if any). If more than one thread has the signal unmasked, which thread receives the signal is undefined. That's what happens (or is supposed to happen). If you want to know the right way to do signal handling in threaded programs, that requires more explanation. Bwahaha. Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010708232131.O8775>