Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA15522; Wed, 28 Feb 96 04:00:50 EST
Received: from enst.enst.fr by MIT.EDU with SMTP
	id AA17275; Wed, 28 Feb 96 03:49:41 EST
Received: from email.enst.fr (root@email.enst.fr [137.194.160.46]) by enst.enst.fr (8.6.10/8.6.10) with ESMTP id JAA23618; Wed, 28 Feb 1996 09:47:54 +0100
Received: from gargantua.enst.fr (gargantua.enst.fr [137.194.160.55]) by email.enst.fr (8.7.Beta.13/8.7.Beta.13) with ESMTP id JAA29143; Wed, 28 Feb 1996 09:47:19 +0100 (MET)
Received: (tardieu@localhost) by gargantua.enst.fr (8.6.10/8.6.10) id JAA11577; Wed, 28 Feb 1996 09:47:16 +0100
Sender: tardieu@Email.ENST.Fr
To: Christopher Provenzano <proven@MIT.EDU>
Cc: Samuel Tardieu <sam@inf.enst.fr>, pthreads@MIT.EDU
Subject: Re: pthreads and fork() 
References: <9602272115.AA26609@jimi.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
Message-Id: <qw6zqa3n8fg.fsf@gargantua.enst.fr>
Lines: 23
Reply-To: Samuel Tardieu <sam@inf.enst.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Precedence: special-delivery
From: Samuel Tardieu <sam@inf.enst.fr>
X-Www: http://autan.enst.fr/~tardieu/
X-Pgp-Key: finger -l tardieu@cyclic.com
X-Mail-Processing: Sam's procmail tools
Organization: Ecole Nationale Superieure des Telecommunications

>>>>> "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

