From e95f557ba57b7102693b169bbe3f93661de8bec7 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sat, 27 Feb 2016 02:08:00 +0100 Subject: [PATCH] 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. --- rc/bin/rcpu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc/bin/rcpu b/rc/bin/rcpu index b14b5d5aa..3e9f17987 100755 --- a/rc/bin/rcpu +++ b/rc/bin/rcpu @@ -23,11 +23,11 @@ fn server { if(test -d /mnt/term/mnt/cpunote) { rfork e mainproc=$apid - exec cat /proc/$mainproc/notepg & + {cat; echo -n hangup} /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 } }