GETPGID(3POSIX)
π GETPGID β POSIX Programmer's Manual, section 3POSIX β¨
okay bestie, quick vibe check before we dive in π«Ά this page is part of the POSIX Programmer's Manual, and here's the tea: the Linux implementation of this interface may differ β so if you're on Linux, go consult the corresponding Linux manual page for the actual Linux behavior. Also possible: the interface may not be implemented on Linux at all. No cap. π
πΈ 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.
π NAME π
getpgid β get the process group ID for a process
β¨ SYNOPSIS β¨
#include <unistd.h>
pid_t getpgid(pid_t pid);
π DESCRIPTION π
The getpgid() function shall return the process group ID of the process whose process ID is equal to pid.
And if pid is equal to 0? Iconic shortcut behavior: getpgid() shall return the process group ID of the calling process. It's giving "just tell me about myself, thanks." π
π₯ RETURN VALUE π₯
Upon successful completion, getpgid() shall return a process group ID. Slay.
Otherwise, it shall return (pid_t)-1 and set errno to indicate the error. π
π ERRORS π
The getpgid() function shall fail if:
EPERMβ The process whose process ID is equal topidis not in the same session as the calling process, and the implementation does not allow access to the process group ID of that process from the calling process. Not in your session? Not your business, bestie. π«ESRCHβ There is no process with a process ID equal topid. Ghosted fr fr. π»
The getpgid() function may fail if:
EINVALβ The value of thepidargument is invalid. π©
The following sections are informative.
π EXAMPLES π
None.
π¦ APPLICATION USAGE π¦
None.
π RATIONALE π
None.
β FUTURE DIRECTIONS β
None.
π§ SEE ALSO π§
exec, fork(), getpgrp(), getpid(), getsid(), setpgid(), setsid()
The Base Definitions volume of POSIX.1β2017, <unistd.h>
π COPYRIGHT π
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 .
okay that's the whole page, you read it, you understood it, main character energy achieved π
IEEE/The Open Group β’ 2017 β’ GETPGID(3POSIX) β mwah, that's the source, the version and the year, love u, bye bestie πβ¨π
π¦ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 Β· Other
- debian trixie: manpages-posix-dev 2017a-2 Β· Other
- ubuntu jammy: manpages-posix-dev 2017a-2 Β· Other
- ubuntu noble: manpages-posix-dev 2017a-2 Β· Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 Β· Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 Β· Other
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms