[LTP] [PATCH v3 4/4] lib: reset SIGTERM to original disposition if timeout occured
Li Wang
liwang@redhat.com
Sat May 8 07:51:09 CEST 2021
To limit the "kill $sleep_pid; exit" action only effect on the
sleep proccess will make code easy to understand.
Also, to get rid of below redundant behavior:
./../../../testcases/lib/tst_test.sh: line 1: kill: (242089) - No such process
Signed-off-by: Li Wang <liwang@redhat.com>
---
testcases/lib/tst_test.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/lib/tst_test.sh b/testcases/lib/tst_test.sh
index b6ca0cb26..28c2052d6 100644
--- a/testcases/lib/tst_test.sh
+++ b/testcases/lib/tst_test.sh
@@ -472,6 +472,7 @@ _tst_timeout_process()
sleep_pid=$!
trap "kill $sleep_pid; exit" TERM
wait $sleep_pid
+ trap - TERM
_tst_kill_test
}
--
2.30.2
More information about the ltp
mailing list