summaryrefslogtreecommitdiffstats
path: root/src/test/test-process-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-06-22 22:24:04 +0200
committerLennart Poettering <lennart@poettering.net>2023-06-23 10:05:16 +0200
commit8c3fe1b5b59ebfd6e462245f2ab82097b4f7494d (patch)
tree4f9dab8ca39791f570f38df3a242b6e03b45f6d6 /src/test/test-process-util.c
parentdocs: document threading situation in coding style (diff)
downloadsystemd-8c3fe1b5b59ebfd6e462245f2ab82097b4f7494d.tar.xz
systemd-8c3fe1b5b59ebfd6e462245f2ab82097b4f7494d.zip
process-util: add simple wrapper around PR_SET_CHILD_SUBREAPER
Let's a simple helper that knows how to deal with PID == 1.
Diffstat (limited to 'src/test/test-process-util.c')
-rw-r--r--src/test/test-process-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c
index 6de09c3c11..ebf73c54ec 100644
--- a/src/test/test-process-util.c
+++ b/src/test/test-process-util.c
@@ -931,7 +931,7 @@ TEST(is_reaper_process) {
assert_se(r >= 0);
if (r == 0) {
/* child */
- assert_se(prctl(PR_SET_CHILD_SUBREAPER, 1, 0, 0, 0) >= 0);
+ assert_se(make_reaper_process(true) >= 0);
assert_se(is_reaper_process() > 0);
_exit(EXIT_SUCCESS);