[281] in Pthreads mailing list archive

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

Re: pthreads and fork()

daemon@ATHENA.MIT.EDU (Jonathan Geisler)
Wed Feb 28 12:19:59 1996

From: Jonathan Geisler <geisler@mcs.anl.gov>
To: sam@inf.enst.fr
Date: Wed, 28 Feb 1996 10:39:23 -0600 (CST)
Cc: proven@MIT.EDU, pthreads@MIT.EDU
In-Reply-To: <qw6zqa3n8fg.fsf@gargantua.enst.fr> from "Samuel Tardieu" at Feb 28, 96 09:47:15 am

> 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).

If you only want to fork 1 thread on Solaris, check out the fork1()
system call.  It should do what you want.

+--------------------------------------------------+
| Jonathan Geisler                                 |
| Mathematics & Computer Science Division          |
| Argonne National Laboratory                      |
| http://www.mcs.anl.gov/people/geisler/index.html |
+--------------------------------------------------+

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