kernel: call freebroken() for kproc() when out of processes

This commit is contained in:
cinap_lenrek 2021-10-16 13:14:14 +00:00
parent a557c515c8
commit 20429fb04f

View file

@ -1401,8 +1401,10 @@ kproc(char *name, void (*func)(void *), void *arg)
static Pgrp *kpgrp;
Proc *p;
while((p = newproc()) == nil)
while((p = newproc()) == nil){
freebroken();
resrcwait("no procs for kproc");
}
qlock(&p->debug);
if(up != nil){