aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-07-14 18:50:42 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-07-14 18:50:42 +0200
commitfe9ba4f8f3c8b114aa32d81fefdc2cd1f4642600 (patch)
treef822fbd6223debb9d07a904337dd40cab41f03a0
parent9f34ef6a0b1fd5545112498e2363d784cee8e42e (diff)
downloadrtty-fe9ba4f8f3c8b114aa32d81fefdc2cd1f4642600.tar.gz
rtty: Kill ssh on exit
-rwxr-xr-xrtty3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtty b/rtty
index e796acb..3050280 100755
--- a/rtty
+++ b/rtty
@@ -8,4 +8,5 @@ rm $in $out 2>/dev/null
mkfifo $in $out
<$in 2>&1 >$out ssh -oBatchMode=yes -tt "$@" &
-exec rio
+trap "kill $! 2>/dev/null" INT QUIT EXIT
+rio