Name

NAME

posix_spawn_file_actions_addclose, posix_spawn_file_actions_addopen — add close or open action to spawn file actions object (ADVANCED REALTIME)

SYNOPSIS

SPN #include <spawn.h>

    int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *
        file_actions,   int fildes);
    int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *
        restrict file_actions,  int fildes,
        const char *restrict path,  int oflag,  mode_t mode);

DESCRIPTION

These functions shall add or delete a close or open action to a spawn file actions object.

A spawn file actions object is of type posix_spawn_file_actions_t (defined in <spawn.h>) and is used to specify a series of actions to be performed by a posix_spawn() or posix_spawnp() operation in order to arrive at the set of open file descriptors for the child process given the set of open file descriptors of the parent. IEEE Std 1003.1-2001 does not define comparison or assignment operators for the type posix_spawn_file_actions_t.

A spawn file actions object, when passed to posix_spawn() or posix_spawnp(), shall specify how the set of open file descriptors in the calling process is transformed into a set of potentially open file descriptors for the spawned process. This transformation shall be as if the specified sequence of actions was performed exactly once, in the context of the spawned process (prior to execution of the new process image), in the order in which the actions were added to the object; additionally, when the new process image is executed, ...

Get Professional Multicore Programming: Design and Implementation for C++ Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.