From: Alan Cox Date: Thu, 18 Dec 2014 23:17:04 +0000 (+0000) Subject: process: Correct handling of out of processes case X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e11ba16254ed5e87dfaf4977f5602c1b706ee4fb;p=FUZIX.git process: Correct handling of out of processes case When the error handling was updated this path was broken. With this fixed running out of memory/swap now correctly fails with ENOMEM --- diff --git a/Kernel/process.c b/Kernel/process.c index cdebd25e..ff8f4e3c 100644 --- a/Kernel/process.c +++ b/Kernel/process.c @@ -271,8 +271,10 @@ ptptr ptab_alloc(void) if (pagemap_alloc(newp) == 0) { newp->p_status = P_FORKING; nproc++; - } else + } else { udata.u_error = ENOMEM; + newp = NULL; + } } irqrestore(irq); if (newp)