All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Wang <liwang@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 4/4] lib: reset SIGTERM to original disposition if timeout occured
Date: Sat,  8 May 2021 13:51:09 +0800	[thread overview]
Message-ID: <20210508055109.16914-5-liwang@redhat.com> (raw)

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


             reply	other threads:[~2021-05-08  5:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  5:51 Li Wang [this message]
2021-05-10 11:57 ` [LTP] [PATCH v3 4/4] lib: reset SIGTERM to original disposition if timeout occured Cyril Hrubis
2021-05-10 12:45   ` Li Wang
2021-05-10 14:38     ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210508055109.16914-5-liwang@redhat.com \
    --to=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.