ref: d0c291c06146693ed6cdc7fb9520716873b5e954
parent: 93147bba7a3b16ad8cbfb58f6858e3eed72de36b
author: cinap_lenrek <cinap_lenrek@gmx.de>
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;
--
⑨