waitpid syscall: fix status

This commit is contained in:
Matheus
2023-09-09 13:28:57 -03:00
parent 22e345b038
commit 09bfc5cde4
+2 -1
View File
@@ -61,8 +61,9 @@ syscallret_t syscall_waitpid(context_t *context, pid_t pid, int *status, int opt
spinlock_release(&proc->lock);
// TODO memory safe operation
// TODO the signal number goes in the low byte of status
if (status)
*status = iterator->status;
*status = iterator->status << 8;
for (int i = 0; i < iterator->threadtablesize; ++i) {
if (iterator->threads[i] == NULL)