POSIX_SPAWNATTR_GETPGROUP(3)

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

πŸ’… POSIX_SPAWNATTR_GETPGROUP(3) β€” get and set the spawn-pgroup attribute of a spawn attributes object

Hey bestie, welcome to the Library Functions Manual section 3 page for these two little icons. They live in the Standard C Library (libc, -lc), and honestly? They're the chillest functions you'll ever meet. 🫢


✨ SYNOPSIS ✨

Okay so first you gotta invite them in, like:

#include <spawn.h>

Then here's the whole cast, no cap:

int
posix_spawnattr_getpgroup(const posix_spawnattr_t *restrict attr,
    pid_t *restrict pgroup);

int
posix_spawnattr_setpgroup(posix_spawnattr_t *attr, pid_t pgroup);

🌸 DESCRIPTION 🌸

So posix_spawnattr_getpgroup() is the reader bestie πŸ’– β€” it goes into the attributes object that attr points at and grabs the value of the spawn-pgroup attribute for you.

Then posix_spawnattr_setpgroup() is the writer bestie ✍️ β€” it sets the spawn-pgroup attribute inside an initialized attributes object that attr points at.

Now, what even is the spawn-pgroup attribute, you ask? 🧐 It represents the process group that the new process image is gonna join during a spawn operation β€” but only if POSIX_SPAWN_SETPGROUP is set in the spawn-flags attribute. iykyk. And the default value of this attribute? It's zero. Literally zero. πŸ’€


πŸŽ€ RETURN VALUES πŸŽ€

Both posix_spawnattr_getpgroup() and posix_spawnattr_setpgroup() return zero. That's it. That's the whole vibe check. βœ… Zero. Slay. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

Go give these other pages some love, fr fr:


🌈 STANDARDS 🌈

Both posix_spawnattr_getpgroup() and posix_spawnattr_setpgroup() conform to IEEE Std 1003.1-2001 (β€œPOSIX.1”). Certified iconic, periodt. πŸ‘‘


⭐ HISTORY ⭐

These two first appeared in FreeBSD 8.0. Baby's first glow-up. 🧚


πŸ’œ AUTHORS πŸ’œ

Big shoutout to Ed Schouten <ed@FreeBSD.org> for bringing these into the world. Main character energy fr. πŸ™ˆ


This page came from Debian, dated March 24, 2008, for POSIX_SPAWNATTR_GETPGROUP(3) β€” and that's the whole thing, bestie. Go forth and spawn responsibly. πŸ“πŸ’…βœ¨
πŸ“¦ where this page comes from