X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/6d2010ae8f7a6078e10b361c6962983bab233e0f..HEAD:/bsd/man/man3/posix_spawn_file_actions_addclose.3 diff --git a/bsd/man/man3/posix_spawn_file_actions_addclose.3 b/bsd/man/man3/posix_spawn_file_actions_addclose.3 index 36c64715d..e2915720a 100644 --- a/bsd/man/man3/posix_spawn_file_actions_addclose.3 +++ b/bsd/man/man3/posix_spawn_file_actions_addclose.3 @@ -61,6 +61,16 @@ .Fa "posix_spawn_file_actions_t *file_actions" .Fa "int filedes" .Fc +.Ft int +.Fo posix_spawn_file_actions_addchdir_np +.Fa "posix_spawn_file_actions_t *file_actions" +.Fa "const char *restrict path" +.Fc +.Ft int +.Fo posix_spawn_file_actions_addfchdir_np +.Fa "posix_spawn_file_actions_t *file_actions" +.Fa "int filedes" +.Fc .Sh DESCRIPTION The .Fn posix_spawn_file_actions_addclose @@ -156,6 +166,45 @@ are made available in the spawned process. In that case, can be used to make specific pre-existing file descriptors from the parent process be available in the spawned process. +.Pp +The +.Fn posix_spawn_file_actions_addchdir +function adds an chdir operation to the list of operations associated with +the object referenced by +.Em file_actions , +for subsequent use in a call to +.Xr posix_spawn 2 +or +.Xr posix_spawnp 2 . +The current working directory will be set as if +.Fn chdir +had been called with +.Em path +prior to the new child process starting execution. +.Pp +The +.Fn posix_spawn_file_actions_addfchdir +function adds a fchdir operation to the list of operations associated with +the object referenced by +.Em file_actions , +for subsequent use in a call to +.Xr posix_spawn 2 +or +.Xr posix_spawnp 2 . +The current working directory will be set as if +.Fn fchdir +had been called with +.Em filedes +prior to the new child process starting execution. +When +.Em POSIX_SPAWN_CLOEXEC_DEFAULT +is set, the file descriptor +.Em filedes +will not be automatically inherited unless an explicit +.Fn posix_spawn_file_actions_addinherit_np +action for +.Em filedes +has been added. .Sh RETURN VALUES On success, these functions return 0; on failure they return an error number from @@ -175,6 +224,12 @@ The value of .Fa file_actions is invalid. .\" ========== +.It Bq Er ENAMETOOLONG +The length of the value specified by +.Fa path +exceeds +.Dv PATH_MAX. +.\" ========== .It Bq Er ENOMEM Insufficient memory was available to add the new action to .Fa file_actions .