*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: posix_spawn_file_actions_addopen | Section: 3 | Source: OpenBSD | File: posix_spawn_file_actions_addopen.3
POSIX_SPAWN_FILE_ACTIONS_ADDOPEN(3) FreeBSD Library Functions Manual NAME posix_spawn_file_actions_addclose, posix_spawn_file_actions_adddup2, posix_spawn_file_actions_addopen - add 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: - The posix_spawn_file_actions_addclose() function adds an action that causes close(fildes); to be called. - The posix_spawn_file_actions_adddup2() function adds an action that causes dup2(fildes, newfildes); to be called. In addition, the action will cause the close-on-exec flag to be cleared on newfildes, even if newfildes equals fildes. - The posix_spawn_file_actions_addopen() function adds an action that causes open(path, oflag, mode); to be called and the result to be forced as fildes (if fildes was already open before this action, the old file descriptor is closed before the action is performed). Note that posix_spawn_file_actions_addopen() makes a copy of the path argument. 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 <[email protected]> FreeBSD 14.1-RELEASE-p8 March 29, 2022 FreeBSD 14.1-RELEASE-p8

Navigation Options