mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
waitpid: stub pid 0
This commit is contained in:
@@ -18,7 +18,12 @@ syscallret_t syscall_waitpid(context_t *context, pid_t pid, int *status, int opt
|
|||||||
if (options & ~KNOWN_FLAGS)
|
if (options & ~KNOWN_FLAGS)
|
||||||
printf("waitpid: unknown %x\n", options);
|
printf("waitpid: unknown %x\n", options);
|
||||||
|
|
||||||
if (pid < -1 || pid == 0) {
|
if (pid == 0) {
|
||||||
|
printf("waitpid: pid 0 is a stub, falling back to -1\n")
|
||||||
|
pid = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pid < -1) {
|
||||||
printf("waitpid: unhandled pid %d\n", pid);
|
printf("waitpid: unhandled pid %d\n", pid);
|
||||||
ret.errno = EOPNOTSUPP;
|
ret.errno = EOPNOTSUPP;
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user