devproc: remove pgrpid == 1 check for notepg open

assuming that this check tried to prevent the hostowner
from killing init, it is silly because init would just
handle the note.

with kbdfs, we actually want to send interrupt note to
the initial process group so instead of working arround
this with rfork(RFNOTEG|RFNAMEG), we remove the check.
This commit is contained in:
cinap_lenrek 2012-11-07 18:57:02 +01:00
parent eb96892d85
commit 2c4a77f21f
2 changed files with 5 additions and 7 deletions

View file

@ -25,6 +25,10 @@ for(i in `{ls -Qp '#ec'}){
}
}
fn sigint {
status=interrupted
}
fn fatal {
echo $*
exit $"*
@ -154,12 +158,6 @@ fn main{
# keyboard and serial console
if(test -x /bin/aux/kbdfs){
# make new pgrp different from 1 so kbdfs can open notepg
rfork ns
# ignore interrupts
fn sigint {status=interrupted}
a=$console(1)
if(! ~ $#a 0)
a=/dev/eia^$a

View file

@ -439,7 +439,7 @@ procopen(Chan *c, int omode)
pg = p->pgrp;
if(pg == nil)
error(Eprocdied);
if(omode!=OWRITE || pg->pgrpid == 1)
if(omode!=OWRITE)
error(Eperm);
c->pgrpid.path = pg->pgrpid+1;
c->pgrpid.vers = p->noteid;