From: twd@cs.brown.edu (Tom Doeppner)
Subject: Re: threads & asynch signals
Date: 1996/01/04 [thread overview]
Message-ID: <4ch34n$c4g@cocoa.brown.edu> (raw)
In-Reply-To: 820765792snz@wsl.co.uk
In article <820765792snz@wsl.co.uk> dcb@wsl.co.uk writes:
>
>Hello there,
>
>Threads and asynch signals don't seem to mix. To quote the man page,
>
>In a multi-threaded environment, the sigaction function should only
>be used for the synch signals.
>
>Does anyone have any idea how one is supposed to write a real time
>application (ie uses SIGALRM and has a handler for it), and use
>the pthreads feature, on this *wonderful* OSF 3.2 ?
>
>There's a free beer in it.
You might use sigwait: mask off SIGALRM throughout the process, then
create a thread that calls sigwait, with SIGALRM set in the argument
mask. The thread will block in the sigwait call and return only when
a SIGALRM occurs. It's a much cleaner way of doing things than with
signal handlers.
Tom Doeppner
Brown University
twd@cs.brown.edu
prev parent reply other threads:[~1996-01-04 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-01-04 5:00 threads & asynch signals David C Binderman
1996-01-04 5:00 ` Tom Doeppner [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox