Skip to contentSkip to conversation

lib: reset SIGTERM to original disposition if timeout occured

PATCH New Li Wang 3 participants 4 messages May 8, 2021 – May 10, 2021

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH v3 4/4 lib: reset SIGTERM to original disposition if timeout occured

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

---
 testcases/lib/tst_test.sh | 1 +
 1 file changed, 1 insertion(+)
testcases/lib/tst_test.sh +1 -0
index b6ca0cb26..28c2052d6 100644
@@ -472,6 +472,7 @@ _tst_timeout_process()
 	sleep_pid=$!
 	trap "kill $sleep_pid; exit" TERM
 	wait $sleep_pid
+	trap - TERM
 	_tst_kill_test
 }
 
Signature · 1 line
2.30.2
author
#2 lore raw

PATCH v3 4/4 lib: reset SIGTERM to original disposition if timeout occured

Quoted 6 lines · Cyril Hrubis

Hi!

The whole series looks good to me. I'm ok with merging these changes beofre the release.

Thanks for the review! Patchset tweaked with your suggestions and merged.

Signature · 2 lines
Regards,
Li Wang
#3 lore raw

PATCH v3 4/4 lib: reset SIGTERM to original disposition if timeout occured

Quoted 9 lines · Cyril Hrubis
Quoted 6 lines

Hi!

The whole series looks good to me. I'm ok with merging these changes beofre the release.

Thanks for the review! Patchset tweaked with your suggestions and merged.

Thanks!

Kind regards,
Petr