POSIX_SPAWN_FILE_ACTIONS_INIT(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

🌸 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

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