[OpenBSD]

Manual Page Search Parameters

POSIX_SPAWN_FILE_ACTIONS_ADDOPEN(3) Library Functions Manual POSIX_SPAWN_FILE_ACTIONS_ADDOPEN(3)

NAME

posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2, posix_spawn_file_actions_addopenadd action to close, dup2 or open file descriptor to file actions object

SYNOPSIS

#include <spawn.h>
int
posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *file_actions, int fildes);
int
posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);
int
posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *file_actions, int fildes, const char *restrict path, int oflag, mode_t mode);

DESCRIPTION

These function add an action to close(2), dup2(2), or open(2) a file descriptor to a posix_spawn(3) file actions object.
Actions are executed in order in the child process:

RETURN VALUES

Upon successful completion, these functions return zero. Otherwise they may return EINVAL for negative file descriptors, or ENOMEM if they run out of memory.

SEE ALSO

posix_spawn(3), posix_spawn_file_actions_init(3), posix_spawnp(3)

STANDARDS

These functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).

AUTHORS

Ed Schouten <ed@FreeBSD.org>
November 30, 2014 OpenBSD-current