From: Alan Cox Date: Wed, 19 Oct 2016 19:51:31 +0000 (+0100) Subject: syscall_proc: 32bit clean X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=4cc18b342496ffaff7bf02fd989c7bf4ebb5f094;p=FUZIX.git syscall_proc: 32bit clean --- diff --git a/Kernel/syscall_proc.c b/Kernel/syscall_proc.c index 135d7219..841285c9 100644 --- a/Kernel/syscall_proc.c +++ b/Kernel/syscall_proc.c @@ -308,7 +308,7 @@ arg_t _waitpid(void) p->p_pgrp == -pid)) { if (p->p_status == P_ZOMBIE) { if (statloc) - uputw(p->p_exitval, statloc); + uputi(p->p_exitval, statloc); retval = p->p_pid; p->p_status = P_EMPTY; @@ -369,10 +369,8 @@ arg_t _fork(void) irqflags_t irq; if (flags) { - /* Brief period of grace... */ -// udata.u_error = EINVAL; -// return -1; - kputs("warning: rebuild libc\n"); + udata.u_error = EINVAL; + return -1; } new_process = ptab_alloc(); @@ -390,9 +388,10 @@ arg_t _fork(void) * *MAY* returns in both the child and parent contexts, however in a * non error case the child may also directly return to userspace * with the return code of 0 and not return from here. Do not assume - * you can execute any child code reliably beyond this call + * you can execute any child code reliably beyond this call.) */ r = dofork(new_process); + #ifdef DEBUG kprintf("Dofork %x (n %x)returns %d\n", udata.u_ptab, new_process, r);