POSIX_SPAWNATTR_GETSCHEDPOLICY(3)
hey bestie π you've landed on POSIX_SPAWNATTR_GETSCHED(3) from the Library Functions Manual, and it's lowkey iconic: this page is all about getting and setting the spawn-schedpolicy attribute of a spawn attributes object. no cap, it's giving scheduler-nerd realness and i'm here for it.
π NAME π
posix_spawnattr_getschedpolicyposix_spawnattr_setschedpolicy
these two besties get and set the spawn-schedpolicy attribute of a spawn attributes object. that's the whole vibe. β¨
π¦ LIBRARY π¦
Standard C Library (libc, -lc) β yup, that's where these functions live, bestie.
β¨ SYNOPSIS β¨
#include <spawn.h>
int
posix_spawnattr_getschedpolicy(const posix_spawnattr_t *restrict attr,
int *restrict schedpolicy);
int
posix_spawnattr_setschedpolicy(posix_spawnattr_t *attr,
int schedpolicy);
πΈ DESCRIPTION πΈ
so posix_spawnattr_getschedpolicy() is the getter gf: she obtains the value of the spawn-schedpolicy attribute from the attributes object referenced by attr. she's not messy, she just reads the vibe and reports back. π«Ά
then posix_spawnattr_setschedpolicy() is the setter bf: he sets the spawn-schedpolicy attribute in an initialized attributes object referenced by attr. key word: initialized, bestie β don't come at him with an uninitialized object and expect magic. π
the spawn-schedpolicy attribute represents the scheduling policy that's going to be assigned to the new process image in a spawn operation β but only if POSIX_SPAWN_SETSCHEDULER is set in the spawn-flags attribute. so like, it's conditional slay. the default value of this attribute is unspecified, which is the manpage way of saying "we're not telling, go check your implementation." π
π RETURN VALUES π
both posix_spawnattr_getschedpolicy() and posix_spawnattr_setschedpolicy() return zero. that's it. that's the whole return value. zero. no drama, no surprises, just zero. periodt. π
π₯ SEE ALSO π₯
posix_spawn(3)posix_spawnattr_destroy(3)posix_spawnattr_getschedparam(3)posix_spawnattr_init(3)posix_spawnattr_setschedparam(3)posix_spawnp(3)
go read these if you want the full spawn-attributes cinematic universe. iykyk. π
π STANDARDS π
posix_spawnattr_getschedpolicy() and posix_spawnattr_setschedpolicy() conform to IEEE Std 1003.1-2001 (βPOSIX.1β). standards queen behavior, honestly. π
π HISTORY π
these two functions first appeared in FreeBSD 8.0. so they've been serving since way back. vintage but still relevant, like a good pair of low-rise jeans. π¦
π AUTHORS π
Ed Schouten <ed@FreeBSD.org> β thank you for your service, king. π«‘π
mwah π β this page is from Debian, dated March 24, 200, and the footer's manual-name energy is POSIX_SPAWNATTR_GETSCHEDPOLICY(3). periodt. π«Ά
π¦ 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