ref: e95f557ba57b7102693b169bbe3f93661de8bec7
parent: f2ddc5f81345a75bf942addfb8a15696bbb63529
author: cinap_lenrek <[email protected]>
date: Fri Feb 26 21:08:00 EST 2016
rcpu: post hangup note to remote when connection breaks when the cat that forwards notes on the remote exits, send a hangup note so processes wont keep hanging arround.
--- a/rc/bin/rcpu
+++ b/rc/bin/rcpu
@@ -23,11 +23,11 @@
if(test -d /mnt/term/mnt/cpunote) {
rfork e
mainproc=$apid
- exec cat </mnt/term/mnt/cpunote/data >/proc/$mainproc/notepg &
+ {cat; echo -n hangup} </mnt/term/mnt/cpunote/data >/proc/$mainproc/notepg &
noteproc=$apid
wait $mainproc
echo -n $status >/mnt/term/env/rstatus >[2]/dev/null
- echo -n kill >/proc/$noteproc/note
+ echo -n hangup >/proc/$noteproc/notepg
}
}