[118] in Pthreads mailing list archive

home help back first fref pref prev next nref lref last post

Re: Signal Handling in Proven threads

daemon@ATHENA.MIT.EDU (Christopher Provenzano)
Tue Sep 12 12:09:51 1995

To: ajung@hssun5.cs.uni-sb.de (Andreas Jung)
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Mon, 11 Sep 1995 11:01:45 +0200."
             <9509110901.AA03916@hssun5.uni-sb.de> 
Date: Tue, 12 Sep 1995 11:16:26 EDT
From: Christopher Provenzano  <proven@MIT.EDU>


> Hi,
> 
> I wrote the following program that implements
> the administrator-worker model. The program runs fine
> under the Pthreads of Frank Mueller but it runs not
> with the Proven PThreads. After some time I noticed that
> the admin() function blocks at the sigwait() statement
> although the main process sends signals via ptread_kill().
> Is this a but in the Proven package ?
> 
> Thanks in advance 
> - Andreas Jung
> 
Well, looking at your code you have a bug in your use of sigwait().
The prototype for sigwait() is

int /* errno */ sigwait(const sigset_t * set, int * signal);

where set is the set of signals to wait on and signal is a
pointer to the location where the actual signal delivered is
to be put. 

The routine sigwait() returns 0 on success.

After I, fixed your code it seemed to run fine.

CAP


home help back first fref pref prev next nref lref last post