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.
This commit is contained in:
parent
f2ddc5f813
commit
e95f557ba5
1 changed files with 2 additions and 2 deletions
|
@ -23,11 +23,11 @@ fn server {
|
||||||
if(test -d /mnt/term/mnt/cpunote) {
|
if(test -d /mnt/term/mnt/cpunote) {
|
||||||
rfork e
|
rfork e
|
||||||
mainproc=$apid
|
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
|
noteproc=$apid
|
||||||
wait $mainproc
|
wait $mainproc
|
||||||
echo -n $status >/mnt/term/env/rstatus >[2]/dev/null
|
echo -n $status >/mnt/term/env/rstatus >[2]/dev/null
|
||||||
echo -n kill >/proc/$noteproc/note
|
echo -n hangup >/proc/$noteproc/notepg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue