devproc: restore psstate info string in procstopwait()
This commit is contained in:
parent
971e14663a
commit
6ad06b36b2
1 changed files with 4 additions and 0 deletions
|
@ -1339,6 +1339,7 @@ proctext(Chan *c, Proc *p)
|
||||||
void
|
void
|
||||||
procstopwait(Proc *p, int ctl)
|
procstopwait(Proc *p, int ctl)
|
||||||
{
|
{
|
||||||
|
char *state;
|
||||||
int pid;
|
int pid;
|
||||||
|
|
||||||
if(p->pdbg != nil)
|
if(p->pdbg != nil)
|
||||||
|
@ -1354,14 +1355,17 @@ procstopwait(Proc *p, int ctl)
|
||||||
return;
|
return;
|
||||||
p->pdbg = up;
|
p->pdbg = up;
|
||||||
qunlock(&p->debug);
|
qunlock(&p->debug);
|
||||||
|
state = up->psstate;
|
||||||
up->psstate = "Stopwait";
|
up->psstate = "Stopwait";
|
||||||
if(waserror()) {
|
if(waserror()) {
|
||||||
|
up->psstate = state;
|
||||||
qlock(&p->debug);
|
qlock(&p->debug);
|
||||||
p->pdbg = nil;
|
p->pdbg = nil;
|
||||||
nexterror();
|
nexterror();
|
||||||
}
|
}
|
||||||
sleep(&up->sleep, procstopped, p);
|
sleep(&up->sleep, procstopped, p);
|
||||||
poperror();
|
poperror();
|
||||||
|
up->psstate = state;
|
||||||
qlock(&p->debug);
|
qlock(&p->debug);
|
||||||
if(p->pid != pid)
|
if(p->pid != pid)
|
||||||
error(Eprocdied);
|
error(Eprocdied);
|
||||||
|
|
Loading…
Reference in a new issue