GETPPID(3POSIX)
π«Ά GETPPID β POSIX Programmer's Manual π«Ά
okay bestie, before we even start: this page lives inside the POSIX Programmer's Manual. that's its whole home base. but heads up β the Linux implementation of this interface may differ (so like, go check the matching Linux manual page for the deets on Linux behavior), or honestly the interface might not even be implemented on Linux at all. vibe check accordingly π
β¨ NAME β¨
getppid β get the parent process ID
πΈ SYNOPSIS πΈ
#include <unistd.h>
pid_t getppid(void);
π DESCRIPTION π
so the getppid() function shall return the parent process ID of the calling process. that's it. that's the whole thing. she's simple, she's iconic, she does one job and she does it well π
β RETURN VALUE β
getppid() shall always be successful, and no return value is reserved to indicate an error. like, there is literally no failure state built in here. no error code, no sad path, nothing. slay π
π ERRORS π
No errors are defined.
The following sections are informative.
π EXAMPLES π
None.
π¦ APPLICATION USAGE π¦
None.
π RATIONALE π
None.
π₯ FUTURE DIRECTIONS π₯
None.
π SEE ALSO π
execfork()getpgid()getpgrp()getpid()kill()setpgid()setsid()
The Base Definitions volume of POSIX.1β2017, <sys_types.h>, <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 .
ngl bestie, that copyright block is long but she's load-bearing β don't skip her π
okay that's the whole page!! courtesy of IEEE/The Open Group, 2017, and the manual name on the tin is GETPPID(3POSIX) β mwah, go get that parent process ID π«Άπβ¨
π¦ 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