From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/rfork.html | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 man/man3/rfork.html (limited to 'man/man3/rfork.html') diff --git a/man/man3/rfork.html b/man/man3/rfork.html new file mode 100644 index 00000000..f76a61fd --- /dev/null +++ b/man/man3/rfork.html @@ -0,0 +1,118 @@ + +rfork(3) - Plan 9 from User Space + + + + +
+
+
RFORK(3)RFORK(3) +
+
+

NAME
+ +
+ + rfork – manipulate process state
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h> +
+
+ int rfork(int flags)
+
+
+

DESCRIPTION
+ +
+ + Rfork is a partial implementation of the Plan 9 system call. It + can be used to manipulate some process state and to create new + processes a la fork(2). It cannot be used to create shared-memory + processes (Plan 9’s RFMEM flag); for that functionality use proccreate + (see thread(3)). +
+ + The flags argument to rfork selects which resources of the invoking + process (parent) are shared by the new process (child) or initialized + to their default values. Flags is the logical OR of some subset + of
+ RFPROC     If set a new process is created; otherwise changes affect + the current process.
+ RFNOWAIT   If set, the child process will be dissociated from the + parent. Upon exit the child will leave no Waitmsg (see wait(3)) + for the parent to collect.
+ RFNOTEG    Each process is a member of a group of processes that all + receive notes when a note is sent to the group (see postnote(3) + and signal(2)). The group of a new process is by default the same + as its parent, but if RFNOTEG is set (regardless of RFPROC), the + process becomes the first in a new group, isolated + +
+ + +
+ + from previous processes. In Plan 9, a process can call rfork(RFNOTEG) + and then be sure that it will no longer receive console interrupts + or other notes. Unix job-control shells put each command in its + own process group and then relay notes to the current foreground + command, making the idiom + less useful.
+ +
+ +
+ RFFDG      If set, the invoker’s file descriptor table (see intro()) + is copied; otherwise the two processes share a single table. +
+ + File descriptors in a shared file descriptor table are kept open + until either they are explicitly closed or all processes sharing + the table exit. +
+ + If RFPROC is set, the value returned in the parent process is + the process id of the child process; the value returned in the + child is zero. Without RFPROC, the return value is zero. Process + ids range from 1 to the maximum integer (int) value. Rfork will + sleep, if necessary, until required process resources are available. + +
+ + Calling rfork(RFFDG|RFPROC) is equivalent to calling fork(2).
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/lib9/rfork.c
+
+
+

DIAGNOSTICS
+ +
+ + Rfork sets errstr.
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3