linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Breno Leitao <leitao@debian.org>, linuxppc-dev@lists.ozlabs.org
Cc: Breno Leitao <leitao@debian.org>,
	Gustavo Romero <gromero@linux.vnet.ibm.com>
Subject: Re: [v3] selftests/powerpc: Kill child processes on SIGINT
Date: Mon, 13 Aug 2018 21:23:11 +1000 (AEST)	[thread overview]
Message-ID: <41ptdC2xJvz9sCS@ozlabs.org> (raw)
In-Reply-To: <1533651339-12816-1-git-send-email-leitao@debian.org>

On Tue, 2018-08-07 at 14:15:39 UTC, Breno Leitao wrote:
> There are some powerpc selftests, as tm/tm-unavailable, that run for a long
> period (>120 seconds), and if it is interrupted, as pressing CRTL-C
> (SIGINT), the foreground process (harness) dies but the child process and
> threads continue to execute (with PPID = 1 now) in background.
> 
> In this case, you'd think the whole test exited, but there are remaining
> threads and processes being executed in background. Sometimes these
> zombies processes are doing annoying things, as consuming the whole CPU or
> dumping things to STDOUT.
> 
> This patch fixes this problem by attaching an empty signal handler to
> SIGINT in the harness process. This handler will interrupt (EINTR) the
> parent process waitpid() call, letting the code to follow through the
> normal flow, which will kill all the processes in the child process group.
> 
> This patch also fixes a typo.
> 
> Signed-off-by: Breno Leitao <leitao@debian.org>
> Signed-off-by: Gustavo Romero <gromero@linux.vnet.ibm.com>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/7c27a26e1ed5a7dd709aa19685d2c9

cheers

  reply	other threads:[~2018-08-13 11:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-31 14:10 [PATCH] powerpc/selftests: Avoid backgroud process/threads Breno Leitao
2018-08-03 10:36 ` Michael Ellerman
2018-08-03 14:37   ` [PATCH v2] selftests/powerpc: Avoid remaining process/threads Breno Leitao
2018-08-06 11:06     ` Michael Ellerman
2018-08-06 18:24       ` Breno Leitao
2018-08-07 14:15         ` [PATCH v3] selftests/powerpc: Kill child processes on SIGINT Breno Leitao
2018-08-13 11:23           ` Michael Ellerman [this message]
2018-08-14  4:16         ` [PATCH v2] selftests/powerpc: Avoid remaining process/threads Michael Ellerman

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=41ptdC2xJvz9sCS@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=gromero@linux.vnet.ibm.com \
    --cc=leitao@debian.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).