Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/gen/posix_spawn.3
Show All 28 Lines | |||||
.\" Electrical and Electronics Engineers, Inc and The Open Group. In the | .\" Electrical and Electronics Engineers, Inc and The Open Group. In the | ||||
.\" event of any discrepancy between this version and the original IEEE and | .\" event of any discrepancy between this version and the original IEEE and | ||||
.\" The Open Group Standard, the original IEEE and The Open Group Standard is | .\" The Open Group Standard, the original IEEE and The Open Group Standard is | ||||
.\" the referee document. The original Standard can be obtained online at | .\" the referee document. The original Standard can be obtained online at | ||||
.\" http://www.opengroup.org/unix/online.html. | .\" http://www.opengroup.org/unix/online.html. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd January 5, 2016 | .Dd November 28, 2021 | ||||
.Dt POSIX_SPAWN 3 | .Dt POSIX_SPAWN 3 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm posix_spawn , | .Nm posix_spawn , | ||||
.Nm posix_spawnp | .Nm posix_spawnp | ||||
.Nd "spawn a process" | .Nd "spawn a process" | ||||
.Sh LIBRARY | .Sh LIBRARY | ||||
.Lb libc | .Lb libc | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In spawn.h | .In spawn.h | ||||
.Ft int | .Ft int | ||||
.Fn posix_spawn "pid_t *restrict pid" "const char *restrict path" "const posix_spawn_file_actions_t *file_actions" "const posix_spawnattr_t *restrict attrp" "char *const argv[restrict]" "char *const envp[restrict]" | .Fo posix_spawn | ||||
.Fa "pid_t *restrict pid" | |||||
.Fa "const char *restrict path" | |||||
.Fa "const posix_spawn_file_actions_t *file_actions" | |||||
.Fa "const posix_spawnattr_t *restrict attrp" | |||||
.Fa "char *const argv[restrict]" | |||||
.Fa "char *const envp[restrict]" | |||||
.Fc | |||||
.Ft int | .Ft int | ||||
.Fn posix_spawnp "pid_t *restrict pid" "const char *restrict file" "const posix_spawn_file_actions_t *file_actions" "const posix_spawnattr_t *restrict attrp" "char *const argv[restrict]" "char *const envp[restrict]" | .Fo posix_spawnp | ||||
.Fa "pid_t *restrict pid" | |||||
.Fa "const char *restrict file" | |||||
.Fa "const posix_spawn_file_actions_t *file_actions" | |||||
.Fa "const posix_spawnattr_t *restrict attrp" | |||||
.Fa "char *const argv[restrict]" | |||||
.Fa "char *const envp[restrict]" | |||||
.Fc | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Fn posix_spawn | .Fn posix_spawn | ||||
and | and | ||||
.Fn posix_spawnp | .Fn posix_spawnp | ||||
functions create a new process (child process) from the specified | functions create a new process (child process) from the specified | ||||
process image. | process image. | ||||
The new process image is constructed from a regular executable | The new process image is constructed from a regular executable | ||||
▲ Show 20 Lines • Show All 343 Lines • ▼ Show 20 Lines | |||||
returns, the child process exits with exit status 127). An open file action | returns, the child process exits with exit status 127). An open file action | ||||
may, by itself, result in any of the errors described by | may, by itself, result in any of the errors described by | ||||
.Fn dup2 , | .Fn dup2 , | ||||
in addition to those described by | in addition to those described by | ||||
.Fn open . | .Fn open . | ||||
This implementation ignores any errors from | This implementation ignores any errors from | ||||
.Fn close , | .Fn close , | ||||
including trying to close a descriptor that is not open. | including trying to close a descriptor that is not open. | ||||
The ignore extends to any errors from individual file descriptors | |||||
.Fn close | |||||
executed as part of the | |||||
.Fn closefrom | |||||
action. | |||||
.El | .El | ||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr close 2 , | .Xr close 2 , | ||||
.Xr dup2 2 , | .Xr dup2 2 , | ||||
.Xr execve 2 , | .Xr execve 2 , | ||||
.Xr fcntl 2 , | .Xr fcntl 2 , | ||||
.Xr open 2 , | .Xr open 2 , | ||||
.Xr sched_setparam 2 , | .Xr sched_setparam 2 , | ||||
.Xr sched_setscheduler 2 , | .Xr sched_setscheduler 2 , | ||||
.Xr setpgid 2 , | .Xr setpgid 2 , | ||||
.Xr vfork 2 , | .Xr vfork 2 , | ||||
.Xr posix_spawn_file_actions_addclose 3 , | .Xr posix_spawn_file_actions_addclose 3 , | ||||
.Xr posix_spawn_file_actions_addclosefrom_np 3 , | |||||
.Xr posix_spawn_file_actions_adddup2 3 , | .Xr posix_spawn_file_actions_adddup2 3 , | ||||
.Xr posix_spawn_file_actions_addopen 3 , | .Xr posix_spawn_file_actions_addopen 3 , | ||||
.Xr posix_spawn_file_actions_addchdir_np 3 , | |||||
.Xr posix_spawn_file_actions_addfchdir_np 3 , | |||||
.Xr posix_spawn_file_actions_destroy 3 , | .Xr posix_spawn_file_actions_destroy 3 , | ||||
.Xr posix_spawn_file_actions_init 3 , | .Xr posix_spawn_file_actions_init 3 , | ||||
.Xr posix_spawnattr_destroy 3 , | .Xr posix_spawnattr_destroy 3 , | ||||
.Xr posix_spawnattr_getflags 3 , | .Xr posix_spawnattr_getflags 3 , | ||||
.Xr posix_spawnattr_getpgroup 3 , | .Xr posix_spawnattr_getpgroup 3 , | ||||
.Xr posix_spawnattr_getschedparam 3 , | .Xr posix_spawnattr_getschedparam 3 , | ||||
.Xr posix_spawnattr_getschedpolicy 3 , | .Xr posix_spawnattr_getschedpolicy 3 , | ||||
.Xr posix_spawnattr_getsigdefault 3 , | .Xr posix_spawnattr_getsigdefault 3 , | ||||
Show All 30 Lines |