#!/bin/rc rfork e chat = /n/gridchat/chat if(! test -f $chat){ echo $chat does not exist >[1=2] exit 'no chat file' } label gridchat cat $chat & killme = $apid fn sighup sigint sigterm{ @{echo kill >/proc/$killme/note} & } while(msg = `''{read}){ echo -n $msg | tr -c '' \x08 if(! ~ $msg $nl) echo -n $user → $msg >>$chat }