Received: from SOUTH-STATION-ANNEX.MIT.EDU by po7.MIT.EDU (5.61/4.7) id AA04559; Mon, 26 Feb 96 08:26:18 EST
Received: from enst.enst.fr by MIT.EDU with SMTP
	id AA24208; Mon, 26 Feb 96 08:20:08 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 OAA20152; Mon, 26 Feb 1996 14:20:04 +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 OAA04624; Mon, 26 Feb 1996 14:19:55 +0100 (MET)
Received: (tardieu@localhost) by gargantua.enst.fr (8.6.10/8.6.10) id OAA04148; Mon, 26 Feb 1996 14:19:52 +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: <9602202026.AA11362@yaz-pistachio.MIT.EDU>
Date: 26 Feb 1996 14:19:51 +0100
In-Reply-To: Christopher Provenzano's message of Tue, 20 Feb 1996 15:26:38 EST
Message-Id: <qw6ravitea0.fsf@gargantua.enst.fr>
Lines: 22
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> The sleep() call is deadlocking pthreads because pthreads
Christopher> assumes that you are going to call exec() fairly soon
Christopher> after calling fork() (This is also what POSIX assumes)
Christopher> and has turned off all scheduling operations.

Christopher> Work is under way to make the behavior of fork() more
Christopher> reasonable by tring to eliminate the scheduling deadlock
Christopher> problems but it is adviseable to still call exec()
Christopher> shortly after calling fork() becuase the fork() call will
Christopher> still only create a child process with the current thread
Christopher> running as per the POSIX standard.

Unfortunately, I don't want to exec anything ; the fork() was here to
release the parent process-id which terminates just after the fork()
occurs. I want to detach the current process...

  Sam
--
"La cervelle des petits enfants, ca doit avoir comme un petit gout de noisette"
                                                       Charles Baudelaire

