diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-06 17:19:41 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-11-06 17:19:41 +0100 |
commit | 599dd1c34f1d4e62ee29b2de42eaba7143590347 (patch) | |
tree | a7cc4f9983f42263a0b6b02ebcdb3268c60dce1e /sys/src/9/boot | |
parent | 120412a6a2bddf3ae01f4e10bb4173021e802a84 (diff) |
make interrupt key (Del) just work in the console
these changes make the interrupt key available in the
console (before rio is started).
kbdfs: will now send a "interrupt" note to its invoking
process group in cooked mode.
bootrc: is now prepared to handle interrupts, mainly to
not accidently spawn a new bootargs prompt.
init: forwards the interrupt to the cpurc/termrc pgrp.
vncs: shields itself from kbdfs notegroup so interrrupt
wont kill the whole vnc session.
Diffstat (limited to 'sys/src/9/boot')
-rw-r--r-- | sys/src/9/boot/bootrc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/src/9/boot/bootrc b/sys/src/9/boot/bootrc index 3057df5cb..d6c1aa512 100644 --- a/sys/src/9/boot/bootrc +++ b/sys/src/9/boot/bootrc @@ -154,6 +154,12 @@ 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 @@ -209,8 +215,10 @@ if(! ~ $#aa 0 && ~ $#bootargs 0 && ~ $#nobootprompt 0){ while(){ @{main} + # subshell doesnt wait on interrupts + while(~ $status interrupted){wait} + # cleanup so it can be restarted nobootprompt=() - user=() rm -f /srv/^(cfs boot slashn cs dns) } </dev/cons |