mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
waitpid syscall: fix status
This commit is contained in:
@@ -61,8 +61,9 @@ syscallret_t syscall_waitpid(context_t *context, pid_t pid, int *status, int opt
|
|||||||
spinlock_release(&proc->lock);
|
spinlock_release(&proc->lock);
|
||||||
|
|
||||||
// TODO memory safe operation
|
// TODO memory safe operation
|
||||||
|
// TODO the signal number goes in the low byte of status
|
||||||
if (status)
|
if (status)
|
||||||
*status = iterator->status;
|
*status = iterator->status << 8;
|
||||||
|
|
||||||
for (int i = 0; i < iterator->threadtablesize; ++i) {
|
for (int i = 0; i < iterator->threadtablesize; ++i) {
|
||||||
if (iterator->threads[i] == NULL)
|
if (iterator->threads[i] == NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user