|
NAMEpdfork , pdgetpid ,
pdkill —
System calls to manage process descriptors
LIBRARYStandard C Library (libc, -lc)SYNOPSIS#include <sys/procdesc.h>
pid_t
int
int
DESCRIPTIONProcess descriptors are special file descriptors that represent processes, and are created usingpdfork (), a variant of
fork(2),
which, if successful, returns a process descriptor in the integer pointed to
by fdp. Processes created via
pdfork () will not cause
SIGCHLD on termination.
pdfork () can accept the flags:
The following system calls also have effects specific to process descriptors: fstat(2) queries status of a process descriptor; currently only the st_mode, st_birthtime, st_atime, st_ctime and st_mtime fields are defined. If the owner read, write, and execute bits are set then the process represented by the process descriptor is still alive. poll(2)
and
select(2)
allow waiting for process state transitions; currently only
close(2)
will close the process descriptor unless RETURN VALUESpdfork () returns a PID, 0 or -1, as
fork(2)
does.
ERRORSThese functions may return the same error numbers as their PID-based equivalents (e.g.pdfork () may return the same error numbers as
fork(2)),
with the following additions:
SEE ALSOclose(2), fork(2), fstat(2), kill(2), kqueue(2), poll(2), wait4(2), capsicum(4), procdesc(4)HISTORYThepdfork (), pdgetpid (), and
pdkill () system calls first appeared in
FreeBSD 9.0.
Support for process descriptors mode was developed as part of the TrustedBSD Project. AUTHORSThese functions and the capability facility were created by Robert N. M. Watson <rwatson@FreeBSD.org> and Jonathan Anderson <jonathan@FreeBSD.org> at the University of Cambridge Computer Laboratory with support from a grant from Google, Inc.
Visit the GSP FreeBSD Man Page Interface. |