From 136cbdf0f179387010d67b37b25c804e8849b733 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Mon, 8 Jan 2024 22:25:07 +0100 Subject: [PATCH] run_qemu.sh: replace storing the pid and kill it a trap by using 'setpriv --pdeathsig TERM' --- run_qemu.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/run_qemu.sh b/run_qemu.sh index 91a11b3..085ec63 100755 --- a/run_qemu.sh +++ b/run_qemu.sh @@ -10,9 +10,6 @@ cleanup() { rv=$? rm -f "$tmpdir/log" [ -e "$tmpdir" ] && rmdir "$tmpdir" - if [ -n "${TAIL_PID:-}" ]; then - kill "$TAIL_PID" - fi if [ -e shared/output.txt ]; then res="$(cat shared/exitstatus.txt)" if [ "$res" != "0" ]; then @@ -30,8 +27,7 @@ if [ -e shared/output.txt ]; then rm shared/output.txt fi touch shared/output.txt -tail -f shared/output.txt & -TAIL_PID=$! +setpriv --pdeathsig TERM tail -f shared/output.txt & # to connect to serial use: # minicom -D 'unix#/tmp/ttyS0'