Date: Thu, 22 Jan 1998 16:42:01 -0500 (EST) From: Robert Watson <robert@cyrus.watson.org> To: questions@FreeBSD.ORG Subject: pthreads implementation in 3.0 Message-ID: <Pine.BSF.3.96.980122163522.5088d-100000@cyrus.watson.org>
next in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980122163522.5088d-100000>