summaryrefslogtreecommitdiff
path: root/sys/man/2
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 15:15:38 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 15:15:38 +0100
commit672cf179a1a8a17a4a977eeada60a035a27ed98d (patch)
treef179313e163c1c9f9dad59251cd05cd31e1f560b /sys/man/2
parentd919ad3b5e8e98d7470275d724772de221e060f6 (diff)
libc: implement getppid() reading /proc/$pid/ppid instead of /dev/ppid
The devcons driver is really the wrong place to serve per process information.
Diffstat (limited to 'sys/man/2')
-rw-r--r--sys/man/2/getpid13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/man/2/getpid b/sys/man/2/getpid
index 6d795746d..9245df9be 100644
--- a/sys/man/2/getpid
+++ b/sys/man/2/getpid
@@ -13,27 +13,18 @@ int getpid(void)
int getppid(void)
.SH DESCRIPTION
.I Getpid
-reads
-.B /dev/pid
-(see
-.IR cons (3))
-and converts it to get the process id of the current process,
+returns the process id of the current process,
a number guaranteed to be unique among all running processes on the machine
executing
.IR getpid .
.PP
.I Getppid
-reads
-.B /dev/ppid
-(see
-.IR cons (3))
-and converts it to get the id of the parent of the current process.
+returns the process id of the parent of the current process.
.SH SOURCE
.B /sys/src/libc/9sys
.SH SEE ALSO
.IR intro (2),
.IR exec (2),
-.IR cons (3),
.IR proc (3)
.SH DIAGNOSTICS
Returns 0 and