48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
'\"macro stdmacro
|
|
.TH PCREATE 3C
|
|
.SH NAME
|
|
pcreate: pcreatel, pcreatev, pcreateve, pcreatelp, pcreatevp \- create a process
|
|
.SH SYNOPSIS
|
|
.B "#include <unistd.h>"
|
|
.PP
|
|
.B "int pcreatel(const char \(**path, const char \(**arg0, ...,"
|
|
.br
|
|
.B " const char \(**argn, 0);"
|
|
.PP
|
|
.B "int pcreatev(const char \(**path, char \(** const \(**argv);"
|
|
.PP
|
|
.B "int pcreateve(const char \(**path, char \(** const \(**argv,"
|
|
.B " char \(** const\(**envp);"
|
|
.PP
|
|
.B "int pcreatelp(const char \(**file, const char \(**arg0, ...,"
|
|
.br
|
|
.B " const char \(**argn, 0);"
|
|
.PP
|
|
.B "int pcreatevp(const char \(**file, char \(** const \(**argv);
|
|
.SH DESCRIPTION
|
|
\f4pcreate\fP in all its forms creates a new process and runs the requested
|
|
program.
|
|
These routines are equivalent to a
|
|
\f4fork\fP(2)
|
|
and
|
|
\f4exec\fP(2)
|
|
pair except that the caller incurs only a small logical swap space penalty
|
|
compared to \f4fork\fP.
|
|
\f4pcreate\fP (using \f4sproc\fP(2)) requires that the calling process have enough virtual space
|
|
left (see \f4setrlimit\fP(2)) to create a temporary 32K stack
|
|
for the new process.
|
|
This new stack also requires system logical swap space.
|
|
A \f4fork\fP on the other hand duplicates the calling process,
|
|
which requires the system
|
|
to reserve logical swap space for all modifiable portions of the calling
|
|
process.
|
|
A very large process may not be allowed to \f4fork\fP
|
|
due to insufficient backing store (swap area).
|
|
.SH "SEE ALSO"
|
|
fork(2), exec(2), prctl(2), setrlimit(2), sproc(2).
|
|
.SH DIAGNOSTICS
|
|
all diagnostics are from either
|
|
\f4sproc\fP(2)
|
|
or
|
|
\f4exec\fP(2).
|