posix_spawn_file_actions_addclose, posix_spawn_file_actions_addopen - addopen or addclose action to the spawn file actions object.
libc.lib
#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 *file_actions, int fildes, const char * path, int oflag, mode_t mode);
The
posix_spawn_file_actions_addclose will add a
close action to the file actions object referenced by
file_actions
argument. This causes the file descriptor to be closed when a new child process
is spawned using this file action object.
The posix_spawn_file_actions_addopen
will add a open action to the file action object referenced by
file_actions argument. This causes the file
named by path argument to be opened when a new child process is spawned using
this file action object. If the file was already open, it will be closed before
the new file is opened.
The string passed by the path argument will be copied by the
posix_spawn_file_actions_addopen
function.
On success, these functions return 0. On error, they return the error number set to indicate the error.
These functions fail if:
[EBADF]
The value specified by file is negative, or greater than equal to {OPEN_MAX}.
[EINVAL]
The value specified by file_actions
is invalid.
[ENOMEM]
Insufficient memory exists to add to the spawn file actions object.
For additional information or queries on this page send feedback
© 2005-2007 Nokia |