[280] in Pthreads mailing list archive
Re: pthreads and fork()
daemon@ATHENA.MIT.EDU (Samuel Tardieu)
Wed Feb 28 04:29:13 1996
To: Christopher Provenzano <proven@MIT.EDU>
Cc: Samuel Tardieu <sam@inf.enst.fr>, pthreads@MIT.EDU
Date: 28 Feb 1996 09:47:15 +0100
In-Reply-To: Christopher Provenzano's message of Tue, 27 Feb 1996 16:15:43 EST
Reply-To: Samuel Tardieu <sam@inf.enst.fr>
From: Samuel Tardieu <sam@inf.enst.fr>
>>>>> "Christopher" == Christopher Provenzano <proven@MIT.EDU> writes:
Christopher> Is or can the fork() occure before any calls to
Christopher> pthread_create()?
Unfortunately not. The fork() is part of the elaboration of an Ada
package (using GNAT on Linux) ; since I cannot guarantee that no user
package will be elaborated before mine, I cannot guarantee that no
tasks (mapped on pthreads) will be created.
Anyway, I've found another way to solve my original problem without
using forking() at the program level but using the shell's
backgrounder.
Thanks a lot for your help however ! At least it helped us to point
out the original design flaw in our code (according to Solaris 2.5
documentation, fork() duplicates all the threads. Seems to be
non-posix from your comments).
Sam
--
"La cervelle des petits enfants, ca doit avoir comme un petit gout de noisette"
Charles Baudelaire