Name

posix_spawn_file_actions_adddup2 - add dup2 action to the spawn file actions object.


Library

libc.lib


Synopsis

#include <spawn.h>

int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);

Detailed Description

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.


Return Values

On success, 0 is returned. On error it returns the error number, set to indicate the error.


Errors

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.


Feedback

For additional information or queries on this page send feedback


© 2005-2007 Nokia 

Top