changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: devproc: restore psstate info string in procstopwait()

changeset 7375: 856353183c2a
parent 7371: b73f589b3c7d
child 7376: c6aadaba5c87
author: cinap_lenrek@felloff.net
date: Sun, 08 Sep 2019 18:53:12 +0200
files: sys/src/9/port/devproc.c
description: devproc: restore psstate info string in procstopwait()
     1.1--- a/sys/src/9/port/devproc.c
     1.2+++ b/sys/src/9/port/devproc.c
     1.3@@ -1339,6 +1339,7 @@ proctext(Chan *c, Proc *p)
     1.4 void
     1.5 procstopwait(Proc *p, int ctl)
     1.6 {
     1.7+	char *state;
     1.8 	int pid;
     1.9 
    1.10 	if(p->pdbg != nil)
    1.11@@ -1354,14 +1355,17 @@ procstopwait(Proc *p, int ctl)
    1.12 		return;
    1.13 	p->pdbg = up;
    1.14 	qunlock(&p->debug);
    1.15+	state = up->psstate;
    1.16 	up->psstate = "Stopwait";
    1.17 	if(waserror()) {
    1.18+		up->psstate = state;
    1.19 		qlock(&p->debug);
    1.20 		p->pdbg = nil;
    1.21 		nexterror();
    1.22 	}
    1.23 	sleep(&up->sleep, procstopped, p);
    1.24 	poperror();
    1.25+	up->psstate = state;
    1.26 	qlock(&p->debug);
    1.27 	if(p->pid != pid)
    1.28 		error(Eprocdied);