![]() |
![]() |
![]() |
![]() |
Initialize a spawn file actions object
#include <spawn.h> int posix_spawn_file_actions_init( posix_spawn_file_actions_t *fact_p);
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The posix_spawn_file_actions_init() function initializes the object referenced by fact_p to contain no file actions for posix_spawn() or posix_spawnp() to perform. For information about destroying a spawn file actions object, see posix_spawn_file_actions_destroy().
A spawn file actions object is an opaque data type that specifies a series of close(), dup2(), and open() actions to be performed by a posix_spawn() or posix_spawnp() operation in order to arrive at the set of open file descriptors for the child process, given the parent's set of open file descriptors. For more information, see posix_spawn().
![]() |
Don't reinitialize a posix_spawn_file_actions_t object without destroying it. Repeated calls to posix_spawn_file_actions_init() with the same posix_spawn_file_actions_t object could result in a memory leak. In the QNX Neutrino implementation, all get and set operations, as well as posix_spawn(), return EINVAL when attempting to reference a destroyed file actions object. |
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
posix_spawn(), posix_spawn_file_actions_addclose(), posix_spawn_file_actions_adddup2(), posix_spawn_file_actions_destroy(), posix_spawnattr_addpartid(), posix_spawnattr_addpartition(), posix_spawnattr_destroy(), posix_spawnattr_getcred(), posix_spawnattr_getflags(), posix_spawnattr_getnode(), posix_spawnattr_getpartid(), posix_spawnattr_getpgroup(), posix_spawnattr_getrunmask(), posix_spawnattr_getschedparam(), posix_spawnattr_getschedpolicy(), posix_spawnattr_getsigdefault(), posix_spawnattr_getsigignore(), posix_spawnattr_getsigmask(), posix_spawnattr_getstackmax(), posix_spawnattr_getxflags(), posix_spawnattr_init(), posix_spawnattr_setcred(), posix_spawnattr_setflags(), posix_spawnattr_setnode(), posix_spawnattr_setpgroup(), posix_spawnattr_setrunmask(), posix_spawnattr_setschedparam(), posix_spawnattr_setschedpolicy(), posix_spawnattr_setsigdefault(), posix_spawnattr_setsigignore(), posix_spawnattr_setsigmask(), posix_spawnattr_setstackmax(), posix_spawnattr_setxflags(), posix_spawnp()
![]() |
![]() |
![]() |
![]() |