POSIX_SPAWN_FILE_ACTIONS_DESTROY(3)
πΈ NAME
Okay so this is the POSIX_SPAWN_FILE_ACTIONS(3) page from the Library Functions Manual, bestie. The main characters are posix_spawn_file_actions_init and posix_spawn_file_actions_destroy, and their whole thing is: initialize and destroy spawn file actions object. π
π LIBRARY
Standard C Library (libc, -lc). Yes, the standard C library β sheβs iconic. β¨
β¨ SYNOPSIS
#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);
π DESCRIPTION
posix_spawn_file_actions_init() initializes the object referenced by file_actions() so it contains no file actions for posix_spawn() or posix_spawnp(). Like, empty. A blank slate. A fresh little action bag with zero actions inside. π
β οΈ Real talk, bestie: initializing an already initialized spawn file actions object may cause memory to be leaked. So donβt double-init your girl, okay? π
posix_spawn_file_actions_destroy() destroys the object referenced by file_actions; the object becomes, in effect, uninitialized. A destroyed spawn file actions object can be reinitialized using posix_spawn_file_actions_init(). But β and this is the rule β the object should not be used after it has been destroyed. Periodt. π
π RETURN VALUES
Upon successful completion, these functions return zero; otherwise, an error number is returned to indicate the error. Cute and simple. β¨
π¨ ERRORS
The posix_spawn_file_actions_init() function will fail if:
[ENOMEM]β insufficient memory exists to initialize the spawn file actions object. π
π SEE ALSO
posix_spawn(3)posix_spawn_file_actions_addclose(3)posix_spawn_file_actions_addclosefrom_np(3)posix_spawn_file_actions_adddup2(3)posix_spawn_file_actions_addopen(3)posix_spawnp(3)
Go read the whole family, iykyk. π«Ά
π STANDARDS
posix_spawn_file_actions_init() and posix_spawn_file_actions_destroy() conform to IEEE Std 1003.1-2001 (βPOSIX.1β). Certified standards girlie behavior. π
π°οΈ HISTORY
The posix_spawn_file_actions_init() and posix_spawn_file_actions_destroy() functions first appeared in FreeBSD 8.0. Vintage-ish, but make it fashion. π
βοΈ AUTHORS
Ed Schouten <ed@FreeBSD.org> β iconic author moment. π
Signed off in the footer, bestie: this page is from Debian, dated November 28, 202, and the footerβs manual tag is POSIX_SPAWN_FILE_ACTIONS_INIT(3). Yes, thatβs exactly what the footer says β no cap. π«Ά
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
- Copyright (C) 2001-2004 by the Institute of
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms