.fp 5 CW
..
.nr ;G \\n(.f
.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
\\*(;G
..
.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
..
0
..
..
SPAWNVEX 3
NAME
spawnvex - process spawn with process file and resource control
SYNOPSIS
.L "#include <ast.h>"
.L "SPAWN_FLAG(op)"
.L "SPAWN_RESET"
.L "SPAWN_cwd"
.L "SPAWN_pgrp"
.L "SPAWN_resetids"
.L "SPAWN_sid"
.L "SPAWN_sigdef"
.L "SPAWN_sigmask"
.L "SPAWN_umask"
.L "SPAWN_close"
.L "SPAWN_dup2"
.L "SPAWN_nocloexec"
.L "pid_t spawnvex(const char* path, char* const argv[], char* const envv[], Spawnvex_t*, vex);"
.L "Spawnvex_t* spawnvex_open(void);"
.L "int spawnvex_add(Spawnvex_t* vex, int64_t arg1, int64_t arg2);"
.L "int spawnvex_apply(Spawnvex_t* vex, int index, int flags);"
.L "int spawnvex_init(Spawnvex_t* vex);"
.L "int spawnvex_close(Spawnvex_t* vex);"
DESCRIPTION
.L spwanvex
combines the
fork (2) control child attributes and file descriptors
and
exec (2) sequence into a single call.
.LR path , .L argv and .L envv are as in execve (2). .L pgid controls the new process group and session:
.L <0 The new process becomes a session leader. is called in the child context.
.L 0 The new process is in the callers process group.
.L 1 The new process becomes a process group leader.
.L >1 The new process joins the process group pgid .
COMMENTS
It is possible to code all process creation using
.LR spawnveg .
The
proc (3) routines and
ksh (1) do this on systems that don't support
fork (2). "SEE ALSO"
fork(2), exec(2), spawnve(2)