diff --git a/sys/src/9/port/devproc.c b/sys/src/9/port/devproc.c index 42aa5bb12..93d92a10b 100644 --- a/sys/src/9/port/devproc.c +++ b/sys/src/9/port/devproc.c @@ -1258,8 +1258,8 @@ procstopwait(Proc *p, int ctl) qunlock(&p->debug); up->psstate = "Stopwait"; if(waserror()) { - p->pdbg = nil; qlock(&p->debug); + p->pdbg = nil; nexterror(); } sleep(&up->sleep, procstopped, p);