posix_spawn_file_actions_adddup2 - add dup2 action to the spawn file actions object.
libc.lib
#include <spawn.h> int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);
The posix_spawn_file_actions_adddup2 will add a dup2 action to the file actions object referenced by file_actions argument. This causes the file descriptor to be duplicated when a new child process is spawned using this file action object.
On success, 0 is returned. On error it returns the error number, set to indicate the error.
The
posix_spawn_file_actions_adddup2() function
fails if:
[EBADF]
The value specified by fildes
or newfildes
is negative or greater than or equal to {OPEN_MAX}.
[ENOMEM]
Insufficient memory exists to add to the spawn file actions object.
The posix_spawn_file_actions_adddup2()
function may fail if:
[EINVAL]
The value specified by file_actions
is invalid.
For additional information or queries on this page send feedback
© 2005-2007 Nokia |