rabbitupdate diffsd5551367 years agoHistory
39 lines · 770 B · Text
RawDownload
--- /sys/src/9/port/sysproc.c	Wed Sep  4 02:49:09 2019+++ ../frontmods/port/sysproc.c	Wed Sep  4 02:54:47 2019@@ -32,6 +32,7 @@ 	Pgrp *opg; 	Rgrp *org; 	Egrp *oeg;+	Sgrp *osg; 	ulong pid, flag; 	Mach *wm; @@ -71,6 +72,12 @@ 			up->rgrp = newrgrp(); 			closergrp(org); 		}+		if(flag & RFCSRVG) {+			osg = up->sgrp;+			up->sgrp = smalloc(sizeof(Sgrp));+			up->sgrp->ref = 1;+			closesgrp(osg);+		} 		if(flag & (RFENVG|RFCENVG)) { 			oeg = up->egrp; 			up->egrp = smalloc(sizeof(Egrp));@@ -156,6 +163,15 @@ 	else { 		incref(up->rgrp); 		p->rgrp = up->rgrp;+	}++	/* Srv group */+	if(flag & RFCSRVG) {+		p->sgrp = smalloc(sizeof(Sgrp));+		p->sgrp->ref = 1;+	} else {+		p->sgrp = up->sgrp;+		incref(p->sgrp); 	}  	/* Environment group */