signals: more general changes

This commit is contained in:
Matheus
2024-05-17 18:48:57 -03:00
parent 7b0cc4c51b
commit 1b63e9b436
13 changed files with 135 additions and 54 deletions
+6
View File
@@ -25,6 +25,12 @@ syscallret_t syscall_waitpid(context_t *context, pid_t pid, int *status, int opt
proc_t *iterator = proc->child;
proc_t *desired = NULL;
if (iterator == NULL) {
ret.errno = ECHILD;
MUTEX_RELEASE(&proc->mutex);
return ret;
}
for (;;) {
if (iterator == NULL) {
if (pid > 0 && desired == NULL) {