From owner-freebsd-questions Thu Jan 22 13:38:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA23164 for questions-outgoing; Thu, 22 Jan 1998 13:38:57 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from fledge.watson.org (root@FLEDGE.RES.CMU.EDU [128.2.91.116]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA23159 for ; Thu, 22 Jan 1998 13:38:48 -0800 (PST) (envelope-from robert@cyrus.watson.org) Received: from cyrus.watson.org (cyrus.pr.watson.org [192.0.2.4]) by fledge.watson.org (8.8.8/8.6.10) with SMTP id QAA09047 for ; Thu, 22 Jan 1998 16:38:09 -0500 (EST) Date: Thu, 22 Jan 1998 16:42:01 -0500 (EST) From: Robert Watson Reply-To: Robert Watson To: questions@FreeBSD.ORG Subject: pthreads implementation in 3.0 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk Quick questions about the pthreads implementation: 1. Is there a thread-safe fork (as found in the Solaris pthreads fork() or lwp fork1()) that only copies the current thread (not the current process and all of its threads). I am working with threads and need to fork/exec another process, but current behavior duplicates all existing threads not just the one that wishes to cause another program to execute. Is there a known workaround to this? :) The Solaris fork() library call implementation claims that it is pthreads compliant; this would make ours less compliant (on the other hand, our fork does not claim to be compliant, so this might not be a problem as such.) 2. As an alternative, is there a call that can be used to suspend threading (leaving the current thread in the foreground) such that the process could fork, do it's little fork thing, then reenable threading to perform a threaded wait for the child to finish. In the mean time, the forked child would not be threading, so the rest of the threads would not be awake to cause problems. Robert N Watson Carnegie Mellon University http://www.cmu.edu/ SafePort Network Services http://www.safeport.com/ robert@fledge.watson.org http://www.watson.org/~robert/