--- /sys/src/9/port/proc.c Mon Nov 5 07:29:45 2018+++ ../frontmods/port/proc.c Fri Dec 7 23:24:25 2018@@ -619,6 +619,7 @@ p->egrp = nil; p->fgrp = nil; p->rgrp = nil;+ p->sgrp = nil; p->pdbg = nil; p->fpstate = FPinit; p->kp = 0;@@ -1088,6 +1089,7 @@ Egrp *egrp; Rgrp *rgrp; Pgrp *pgrp;+ Sgrp *sgrp; Chan *dot; void (*pt)(Proc*, int, vlong); @@ -1117,6 +1119,13 @@ closeegrp(egrp); if(rgrp != nil) closergrp(rgrp);+ /* sgrp is nilled out here because closefgrp may need srvclose */+ qlock(&up->debug);+ sgrp = up->sgrp;+ up->sgrp = nil;+ qunlock(&up->debug);+ if(sgrp != nil)+ closesgrp(sgrp); if(dot != nil) cclose(dot); if(pgrp != nil)
--- /sys/src/9/port/proc.c Mon Nov 5 07:29:45 2018
+++ ../frontmods/port/proc.c Fri Dec 7 23:24:25 2018
@@ -619,6 +619,7 @@
p->egrp = nil;
p->fgrp = nil;
p->rgrp = nil;
+ p->sgrp = nil;
p->pdbg = nil;
p->fpstate = FPinit;
p->kp = 0;
@@ -1088,6 +1089,7 @@
Egrp *egrp;
Rgrp *rgrp;
Pgrp *pgrp;
+ Sgrp *sgrp;
Chan *dot;
void (*pt)(Proc*, int, vlong);
@@ -1117,6 +1119,13 @@
closeegrp(egrp);
if(rgrp != nil)
closergrp(rgrp);
+ /* sgrp is nilled out here because closefgrp may need srvclose */
+ qlock(&up->debug);
+ sgrp = up->sgrp;
+ up->sgrp = nil;
+ qunlock(&up->debug);
+ if(sgrp != nil)
+ closesgrp(sgrp);
if(dot != nil)
cclose(dot);
if(pgrp != nil)