diff options
author | dzwdz | 2022-05-06 13:31:11 +0200 |
---|---|---|
committer | dzwdz | 2022-05-06 13:31:11 +0200 |
commit | 292e55a3c344e649d271cfb3c9063ac8b2484de6 (patch) | |
tree | 9484693110882ae0088f72eaa21f859521bb9eb8 /src/kernel/syscalls.c | |
parent | d8c330821aa3ae1d441cdf3aed64d457d0ed0cd9 (diff) |
kernel/proc: get rid of the PS_DEADER state, free processes asap
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 01d42a0..f3161e5 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -23,10 +23,12 @@ int _syscall_await(void) { // find any already dead children for (struct process *iter = process_current->child; iter; iter = iter->sibling) { - if (iter->state == PS_DEAD && !iter->noreap) + if (iter->state == PS_DEAD && !iter->noreap) { + assert(!iter->noreap); SYSCALL_RETURN(process_try2collect(iter)); - if (iter->state != PS_DEADER) + } else { has_children = true; + } } if (!has_children) { |