code: plan9front

Download patch

ref: d919ad3b5e8e98d7470275d724772de221e060f6
parent: d0cc9e2eb65222edb244f93d97d062e6f4eb5e7e
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Dec 19 09:59:19 EST 2020

devsons: remove #c/pgrpid

The process group id is essentially a unique id
of the namespace but it was never well documented
nor is it used by any program.

--- a/sys/man/3/cons
+++ b/sys/man/3/cons
@@ -17,7 +17,6 @@
 .B /dev/mordor
 .B /dev/null
 .B /dev/osversion
-.B /dev/pgrpid
 .B /dev/pid
 .B /dev/ppid
 .B /dev/random
@@ -247,9 +246,6 @@
 .I cons
 device are all single numbers:
 .TP 10
-.B pgrpid
-process group number
-.TP
 .B pid
 process number
 .TP
--- a/sys/src/9/port/devcons.c
+++ b/sys/src/9/port/devcons.c
@@ -308,7 +308,6 @@
 	Qhostowner,
 	Qnull,
 	Qosversion,
-	Qpgrpid,
 	Qpid,
 	Qppid,
 	Qrandom,
@@ -340,7 +339,6 @@
 	"kprint",	{Qkprint, 0, QTEXCL},	0,	DMEXCL|0440,
 	"null",		{Qnull},	0,		0666,
 	"osversion",	{Qosversion},	0,		0444,
-	"pgrpid",	{Qpgrpid},	NUMSIZE,	0444,
 	"pid",		{Qpid},		NUMSIZE,	0444,
 	"ppid",		{Qppid},	NUMSIZE,	0444,
 	"random",	{Qrandom},	0,		0444,
@@ -503,9 +501,6 @@
 		
 	case Qkprint:
 		return qread(kprintoq, buf, n);
-
-	case Qpgrpid:
-		return readnum((ulong)offset, buf, n, up->pgrp->pgrpid, NUMSIZE);
 
 	case Qpid:
 		return readnum((ulong)offset, buf, n, up->pid, NUMSIZE);
--- a/sys/src/9/port/pgrp.c
+++ b/sys/src/9/port/pgrp.c
@@ -9,7 +9,6 @@
 	Whinesecs = 10,		/* frequency of out-of-resources printing */
 };
 
-static Ref pgrpid;
 static Ref mountid;
 
 Pgrp*
@@ -19,7 +18,6 @@
 
 	p = smalloc(sizeof(Pgrp));
 	p->ref = 1;
-	p->pgrpid = incref(&pgrpid);
 	return p;
 }
 
--- a/sys/src/9/port/portdat.h
+++ b/sys/src/9/port/portdat.h
@@ -474,7 +474,6 @@
 	Ref;
 	RWlock	ns;			/* Namespace n read/one write lock */
 	int	noattach;
-	ulong	pgrpid;
 	Mhead	*mnthash[MNTHASH];
 };