SYNOPSIS
#include <spawn.h>
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *file_actions, int fildes, int newfildes);
DESCRIPTION
The
For more information on spawn file actions objects, see the
PARAMETERS
- fildes
-
Specifies a file descriptor.
- file_actions
-
Points to a spawn file actions object.
- newfildes
-
Specifies the file descriptor to be created as a duplicate of fildes.
RETURN VALUES
On successful completion,
Otherwise, this function returns one of the following error numbers:
- EBADF
-
One or both of the file descriptors specified, fildes and newfildes, is either a negative value or is greater than or equal to {OPEN_MAX}.
- ENOMEM
-
There is not enough memory to add to the spawn file actions object.
- EINVAL
-
The file_actions argument contains an invalid value.
- Note:
-
It is not considered an error when fildes specifies a file descriptor for which the specified operation could not be performed at the time of the call. Such an error is, however, detected when the file actions object is later used in a
posix_spawn() orposix_spawnp() function call.
CONFORMANCE
UNIX 03.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
dup2() ,posix_spawn() ,posix_spawn_file_actions_addclose() ,posix_spawn_file_actions_destroy() ,posix_spawnp()
- Miscellaneous:
- spawn
PTC MKS Toolkit 10.5 Documentation Build 40.