GETPGRP(3POSIX)

πŸ’– GETPGRP(3POSIX) β€” bestie, it's the POSIX Programmer's Manual πŸ’–

okay so before we even get into it β€” this page is part of the POSIX Programmer's Manual, k? And like, a heads up, the Linux version of this same interface might act different (so go check the Linux man page for the actual Linux tea), or honestly it might not even be implemented on Linux at all. πŸ™ˆ


✨ PROLOG ✨

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ β€” consult the corresponding Linux manual page for details of Linux behavior β€” or the interface may not be implemented on Linux. so like. vibe check your platform first, bestie 🫢


🌸 NAME 🌸

getpgrp β€” get the process group ID of the calling process

it's giving "who's my group, bestie?" and the answer is you're literally about to find out πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <unistd.h>

pid_t getpgrp(void);

no arguments, no drama, she takes void and she means it ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

The getpgrp() function shall return the process group ID of the calling process. that's it. that's the whole function. iconic, unbothered, zero notes πŸ‘‘


🌈 RETURN VALUE 🌈

The getpgrp() function shall always be successful and no return value is reserved to indicate an error. like she literally cannot fail, main character energy fr fr πŸ’–


⭐ ERRORS ⭐

No errors are defined.

The following sections are informative.


πŸ’€ EXAMPLES πŸ’€

None. (not a single one. she's that simple, no cap πŸŽ€)


🧚 APPLICATION USAGE 🧚

None.


πŸ‘‘ RATIONALE πŸ‘‘

so the lore is: 4.3 BSD provides a getpgrp() function that returns the process group ID for a specified process. And like yeah, that version supports job control and everything, but plot twist β€” all known job control shells always specify the calling process with this function anyway. so the simpler System V getpgrp() suffices, and the added complexity of the 4.3 BSD getpgrp() is provided by the XSI extension getpgid(). periodt. simplicity ate πŸ’…βœ¨


πŸ”₯ FUTURE DIRECTIONS πŸ”₯

None. she's not going anywhere, she's perfect as she is πŸ’œ


🌸 SEE ALSO 🌸

  • exec
  • fork()
  • getpgid()
  • getpid()
  • getppid()
  • kill()
  • setpgid()
  • setsid()

The Base Definitions volume of POSIX.1‐2017, <sys_types.h>, <unistd.h> πŸ¦‹


Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


no cap, that whole copyright block is the legal version of "please don't come for me, the original standard is the real referee" 😭🫢

and that's the whole page bestie!! brought to you by IEEE/The Open Group, 2017 β€” this was GETPGRP(3POSIX) and she ate, mwah πŸ’…πŸ’–βœ¨