summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/getppid.c
AgeCommit message (Collapse)Author
2020-12-19libc: implement getppid() reading /proc/$pid/ppid instead of /dev/ppidcinap_lenrek
The devcons driver is really the wrong place to serve per process information.
2012-12-03ape: fix _grpmems(), access(), getppid(), cleanupcinap_lenrek
_grpmems() was broken tokenizing group list in place. we have to copy it to status buffer before tokenizing. dynamically alloc path for test file to check write permission on directory and add pid to the name to prevent races. use _OPEN instead of ape open to read /dev/ppid in getppid(). use mode enums instead of numeric constants for _OPEN() and _CREATE().
2012-12-03ape: fix more bugs, use /env and /proc instead of #e and #p, cleanupcinap_lenrek
remove envname length limitation in _envsetup() by using allocated buffer and use /env instead of #e use /proc and getpid() instead of #p and #c in readprocfdinit() fix buffer overflow in execlp(), check if name of failed exec starts with / . or is \0 make sure not to close our own filedescriptors for FD_CLOEXEC in execve(), fix wrong length check for flushing buffer to /env/_fdinfo. fix error handling cases. copy the enviroment before decoding \1 to \0 because the strings in environ[] array might not be writable. remove bogus close if we fail to open ppid file in getppid() and use /dev/ppid instead of #c/ppid
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen