From: SJ Park <sj@kernel.org>
To: Hari Mishal <harimishal1@gmail.com>
Cc: SJ Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] selftests/damon/sysfs.py: clean up sh processes used for obsolete_target test
Date: Tue, 21 Jul 2026 16:51:52 -0700 [thread overview]
Message-ID: <20260721235153.149569-1-sj@kernel.org> (raw)
In-Reply-To: <20260721190404.135937-1-harimishal1@gmail.com>
Hello Hari,
On Tue, 21 Jul 2026 21:04:04 +0200 Hari Mishal <harimishal1@gmail.com> wrote:
> The obsolete_target test spawns three sh processes and uses their pids
> as DAMON monitoring targets. These processes are created without their
> own stdin, so they inherit the test program's stdin, and they are never
> waited on or told to exit. As a result, they are left running (or
> become zombies) as orphaned children after the test program exits.
Thank you for finding this problem and sharing this great patch!
>
> Give each sh process its own dedicated stdin pipe instead of inheriting
> the test program's, and after the targets are no longer needed,
> communicate() with each process to close its stdin. This sends EOF to
> the shell, which makes it exit, and communicate() then reaps the
> process.
Can't we use terminate() or kill() instead of communicate()?
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-07-21 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 19:04 [PATCH] selftests/damon/sysfs.py: clean up sh processes used for obsolete_target test Hari Mishal
2026-07-21 23:51 ` SJ Park [this message]
2026-07-22 1:23 ` [PATCH v2] " Hari Mishal
2026-07-22 3:38 ` SJ Park
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=20260721235153.149569-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=harimishal1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.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 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.