SYNOPSIS
#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_tmode);
DESCRIPTION
The
Both of these functions use a spawn file actions object of
type posix_spawn_file_actions_t
(defined in <spawn.h>) to specify the actions
that
The
The
The
PARAMETERS
- fildes
-
Specifies a file descriptor,
- file_actions
-
Points to a spawn file actions object.
- mode
-
Specifies the permissions to be assigned when a new file is opened using the added open action. This is the same as the mode argument for the
open() function. - oflag
-
Specifies the bitwise inclusive-OR of the file access modes and file status flags to be used when a new file is opened using the added open action. This is the same as the oflag argument for the
open() function. - path
-
Specifies the path name of the file to be opened using the added open action. This is the same as the pathname argument for the
open() function.
RETURN VALUES
When completed successfully, the
- EBADF
-
The fildes argument is negative or it is greater than or equal to {OPEN_MAX}.
- EINVAL
-
The file_actions argument contains an invalid value.
- ENOMEM
-
There is not enough memory to add to the spawn file actions object.
- 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:
close() ,dup() ,open() ,posix_spawn() ,posix_spawn_file_actions_adddup2() ,posix_spawn_file_actions_destroy() ,posix_spawnp()
- Miscellaneous:
- spawn
PTC MKS Toolkit 10.5 Documentation Build 40.