event (240B)
1 #!/bin/rc 2 3 wm='' 4 if(~ $1 -d) { 5 wm = '&wm/wm wm/logon</dev/null' 6 shift 7 } 8 9 inferno '{$home/wmii/test/event.dis $*'$wm'}' $* & 10 inf = $apid 11 12 . 9.rc 13 14 fn sigint sigterm {exit} 15 fn sigexit {/bin/kill $apid} 16 17 while(! ~ `{read </dev/tty} q) 18 true 19