POSIX_SPAWNATTR_GETPGROUP(3)
π 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
- 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