Received: from PACIFIC-CARRIER-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA16704; Tue, 26 Dec 95 14:50:03 EST
Received: from mailgate.nau.edu by MIT.EDU with SMTP
	id AA09157; Tue, 26 Dec 95 14:49:56 EST
Received: from dana.ucc.nau.edu (dana.ucc.nau.edu)
 by NAUVAX.UCC.NAU.EDU (PMDF V5.0-4 #2384)
 id <01HZ9IA4QV4W8Y69M2@NAUVAX.UCC.NAU.EDU> for proven@MIT.EDU; Tue,
 26 Dec 1995 12:50:04 -0700 (MST)
Received: (from scd@localhost) by dana.ucc.nau.edu (8.7.1/2.12b-nau)
 id MAA17889 for proven@MIT.EDU; Tue, 26 Dec 1995 12:50:02 -0700 (MST)
Date: Tue, 26 Dec 1995 12:50:02 -0700
From: scd@dana.ucc.nau.edu (Steven C. Dake)
Subject: Re: Pthreads
In-Reply-To: Christopher Provenzano <proven@MIT.EDU>
 <Pthreads@NAUVAX.UCC.NAU.EDU> (Dec 25, 9:07pm)
To: Christopher Provenzano <proven@MIT.EDU>
Message-Id: <199512261950.MAA17889@dana.ucc.nau.edu>
X-Mailer: Mail User's Shell (7.2.5 10/14/92)
Content-Transfer-Encoding: 7BIT

On Dec 25,  9:07pm, Christopher Provenzano wrote:
} Subject: Pthreads
} > 
} > From: scd@dana.ucc.nau.edu (Steven C. Dake)
} > Subject: Re: Thread Packages for Linux?
} > Date: 17 Dec 1995 23:31:10 GMT
} > 
} > PCThreads is the way to go. MIT Pthreads is fairly broken in linux, especially
} > fork(), signal(), and wait().  The non-process blocking IO is nice, but that
} > is now also available in PCThreads.  Only problem with PCthreads is currently
} > it is a binary only distribution and only available in a.out (ugh).
} > 
} > PCThreads can be found on sunsite.
} > 
} Could you elaborate on the problems you are having? 
} 
} CAP
}-- End of excerpt from Christopher Provenzano

Sure.  I mailed you some time ago (like during beta3 phase) regarding my wait
problem, but no solution was ever posed.  It should be somewhere in the
bugs mailing list, around 20 or so.  I've not tried beta4 and someone mentioned
that beta4 is broken too, but with a simple patch wait and signal now work.

The wait problem I had was this.

I had a parent process that would fork a child.  The child would run.  Then
if the child ever died, it would respawn another child.  This created a
serious problem, since wait() would return automatically and not wait until
the process had completed exection.  This would result in 12034838 spawned
processes :)  (it worked in c without the pthreads lib, btw).  The purpose
was to ensure the child would always be running, ie: if it died, it would
restart automatically.  Thereis better ways to solve that problem, but there
are some other details I've left out (basically the parent is used as a CGI 
executor for web software and needs uid0, while the child needs uidnobody)
so this was a simple hack that got the job done.  but the wait was the broken
part.

Hope this helps, other then that, I thought pthreads was very nicely done, 
especially the non block io libraries!


-- 
-------------------------------------------------------------------------------
| Steven C. Dake                   Unix newbies that think ctrl-Z is the same |
| (scd@dana.ucc.nau.edu)           as ctrl-C make _Solaris_ REALLY slow!      |
-------------------------------------------------------------------------------
