[222] in Pthreads mailing list archive

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

Re: BUG IN PTHREADS 1_60BETA4

daemon@ATHENA.MIT.EDU (Christopher Provenzano)
Fri Dec 1 05:59:37 1995

To: "SethMeister G." <consp05@bingsuns.cc.binghamton.edu>
Cc: pthreads@MIT.EDU
In-Reply-To: Your message of "Tue, 28 Nov 1995 17:48:43 EST."
             <199511282248.RAA06886@bingsun2-gw> 
Date: Fri, 01 Dec 1995 05:08:42 EST
From: Christopher Provenzano  <proven@MIT.EDU>


> Hi there,
> 
>   I just wanted to report 2 bugs in the pthreads library:
> 
>    (1)  In the scanf stdio library function, the mutex held while input 
>    was performed was locked TWICE once before the stream manip, and once 
>    after (it should be unlocked after, but it is NOT ).
> 
>    (2) This one is NASTY - On Solaris 2.4, fork() does not work properly 
> 100% of the time.  eg: if one tries the following code:
> 
>   for ( int i = 0; i < 100; i++ )
>     if ( fork() == 0 ) exit(0);
> 
>   Sometimes, the process LOCKS UP totally.
> 
> 
> Please send me an acknowledgement once you receive this.  Thank you.

OK, I got them and have fixed 1 and will try and fix 2. Number 2 is not a 
lockup but a bug in Solaris where if the parent gets a SIGCHLD and tries to
reinstall the signal handler and does not do a wait() in the signal handler
then the kernel will never mark the signal as handled and will reissue the
signal when the handler returns.

CAP

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