ref: 2c4a77f21fea98bcc1edd0bb69f74cf80060c027
parent: eb96892d857355499a7400381e9186512a7d153f
author: cinap_lenrek <[email protected]>
date: Wed Nov 7 13:57:02 EST 2012
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.
--- a/sys/src/9/boot/bootrc
+++ b/sys/src/9/boot/bootrc
@@ -25,6 +25,10 @@
}
}
+fn sigint {
+ status=interrupted
+}
+
fn fatal {
echo $*
exit $"*
@@ -154,12 +158,6 @@
# 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
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -439,7 +439,7 @@
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;