diff --git a/scripts/kamp-fifo b/scripts/kamp-fifo index e8604f3..735e1bc 100755 --- a/scripts/kamp-fifo +++ b/scripts/kamp-fifo @@ -29,9 +29,9 @@ kamp >/dev/null # fail early if there is no session d=$(mktemp -d) fifo="$d/fifo" +mkfifo "$fifo" trap 'unlink "$fifo" && rmdir "$d"; exit' EXIT HUP INT TERM -mkfifo "$fifo" if [ "$cflag" ]; then kamp -c "$cval" send "edit -scroll -fifo $fifo *${1:-kamp-fifo}*; focus"