From 00ca8ef1357b2a20c3dfcbac2d6b727ef4db4cd6 Mon Sep 17 00:00:00 2001 From: sperber Date: Wed, 10 Apr 2002 15:13:21 +0000 Subject: [PATCH] Document new behavior of FORK and %FORK. --- doc/scsh-manual/syscalls.tex | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/doc/scsh-manual/syscalls.tex b/doc/scsh-manual/syscalls.tex index ff9bc1c..8fbc189 100644 --- a/doc/scsh-manual/syscalls.tex +++ b/doc/scsh-manual/syscalls.tex @@ -1800,21 +1800,27 @@ without flushing buffered output. Suspend the current process with a SIGSTOP signal. \end{defundesc} -\defun {fork} {[thunk]} {proc or \sharpf} -\defunx {\%fork} {[thunk]} {proc or \sharpf} +\defun {fork} {[thunk or \sharpf] [continue-threads?]} {proc or \sharpf} +\defunx {\%fork} {[thunk or \sharpf] [continue-threads?]} {proc or \sharpf} \begin{desc} - \ex{fork} with no arguments is like C \ex{\urlh{http://www.FreeBSD.org/cgi/man.cgi?query=fork&apropos=0&sektion=0&manpath=FreeBSD+4.3-RELEASE&format=html}{fork()}}. - In the parent process, it returns the child's \emph{process object} - (see below for more information on process objects). - In the child process, it returns {\sharpf}. + \ex{fork} with no arguments or \sharpf{} instead of a thunk is like + C + \ex{\urlh{http://www.FreeBSD.org/cgi/man.cgi?query=fork&apropos=0&sektion=0&manpath=FreeBSD+4.3-RELEASE&format=html}{fork()}}. + In the parent process, it returns the child's \emph{process object} + (see below for more information on process objects). In the child + process, it returns {\sharpf}. - \ex{fork} with an argument only returns in the parent process, returning - the child's process object. - The child process calls \var{thunk} and then exits. - - \ex{fork} flushes buffered output before forking, and sets the child - process to non-interactive. \verb|%fork| does not perform this bookkeeping; - it simply forks. + \ex{fork} with an argument only returns in the parent process, returning + the child's process object. + The child process calls \var{thunk} and then exits. + + \ex{fork} flushes buffered output before forking, and sets the child + process to non-interactive. \verb|%fork| does not perform this bookkeeping; + it simply forks. + + The optional boolean argument \var{continue-threads?} specifies + whether the currently active threads continue to run in the child or + not. The default is \sharpf. \end{desc} \defun {fork/pipe} {[thunk]} {proc or \sharpf}