kernel: move pgrpid to devself

This commit is contained in:
Giacomo Tesio 2016-12-26 01:04:59 +01:00
parent 66373243bd
commit 31aa85b01a
2 changed files with 5 additions and 5 deletions

View File

@ -676,7 +676,6 @@ enum{
Qhostowner,
Qnull,
Qosversion,
Qpgrpid,
Qrandom,
Qreboot,
Qswap,
@ -707,7 +706,6 @@ static Dirtab consdir[]={
"kprint", {Qkprint, 0, QTEXCL}, 0, DMEXCL|0440,
"null", {Qnull}, 0, 0666,
"osversion", {Qosversion}, 0, 0444,
"pgrpid", {Qpgrpid}, NUMSIZE, 0444,
"random", {Qrandom}, 0, 0444,
"reboot", {Qreboot}, 0, 0664,
"swap", {Qswap}, 0, 0664,
@ -934,9 +932,6 @@ consread(Chan *c, void *buf, long n, int64_t off)
case Qkprint:
return qread(kprintoq, buf, n);
case Qpgrpid:
return readnum(offset, buf, n, up->pgrp->pgrpid, NUMSIZE);
case Qtime:
return readtime(offset, buf, n);

View File

@ -35,6 +35,7 @@ typedef enum SelfNodes
/* Process control */
Qpid,
Qppid,
Qpgrpid,
Qsegments,
Qpipes,
Qwdir,
@ -64,6 +65,7 @@ static Dirtab selfdir[]={
".", {Qdir, 0, QTDIR}, 0, DMDIR|0777,
"pid", {Qpid}, 0, 0,
"ppid", {Qppid}, 0, 0,
"pgrpid", {Qpgrpid}, 0, 0,
"segments", {Qsegments}, 0, 0644,
"pipes", {Qpipes}, 0, 0,
"wdir", {Qwdir}, 0, 0644,
@ -453,6 +455,9 @@ selfremove(Chan* c)
case Qppid:
errorl("got parent pid", up->parentpid);
break;
case Qpgrpid:
errorl("got process group number", up->pgrp->pgrpid);
break;
case Qpipes:
pipeset = newpipe();
errorl("got new pipes", pipeset);