| POSIX_SPAWN_FILE_ACTIONS_INIT(3) | Library Functions Manual | POSIX_SPAWN_FILE_ACTIONS_INIT(3) |
posix_spawn_file_actions_init,
posix_spawn_file_actions_destroy —
create and destroy posix_spawn file actions
objects
#include
<spawn.h>
int
posix_spawn_file_actions_init(posix_spawn_file_actions_t
*file_actions);
int
posix_spawn_file_actions_destroy(posix_spawn_file_actions_t
*file_actions);
File actions objects can be initialized by
posix_spawn_file_actions_init()
and destroyed by
posix_spawn_file_actions_destroy().
Multiple initialization of the same object is undefined behavior and will lead to memory leaks.
Similarly, objects should be
passed to
posix_spawn_file_actions_destroy()
to reclaim memory. The object should not be re-used after destruction. It
can however be initialized again with
posix_spawn_file_actions_init().
These function return 0 on successful completion. They may return
ENOMEM when running out of memory.
Both functions conform to IEEE Std 1003.1-2001 (“POSIX.1”).
Ed Schouten <ed@FreeBSD.org>
| November 30, 2014 | Debian |