Linux repositories inspector

spawnveg(3ast)

ksh-devel

Korn Shell development environment

NAME

spawnveg - process spawn with process group and session control

SYNOPSIS

#include <ast.h>
int spawnveg(const char* command, char** argv, char** envv, pid_t pgid);

DESCRIPTION

spwanvegcombines fork(2), exec(2), setpgid(2) and setsid(2) into a single call.
command argvand envvare as in execve(2). pgidcontrols the new process group and session:
<0The new process becomes a session leader. is called in the child context.
0The new process is in the callers process group.
1The new process becomes a process group leader.
>1The new process joins the process group pgid.

COMMENTS

It is possible to code all process creation (except for vfork(2) hack like in csh(1)) using spawnveg The proc(3) routines and ksh(1) do this on systems that don’t support fork(2). This makes porting to NT and Windows a snap: a simple iffe(1) probe provides a spawnvegimplementation using the NT or Windows process primitives.

SEE ALSO

fork(2), exec(2), setpgid(2), setsid(2), spawnve(2)
⇧ Top