aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2021-06-23 19:26:58 +0300
committerSergey Poznyakoff <gray@gnu.org>2021-06-23 19:26:58 +0300
commit32b66872e62d69c96fb13cc23e76defece1649bf (patch)
treee8472659ffea9d1617be65ebba83b2d425ee2940
parent70631fcb8a1e76aea231611d4a8b169da6cf1f56 (diff)
downloadpies-32b66872e62d69c96fb13cc23e76defece1649bf.tar.gz
pies-32b66872e62d69c96fb13cc23e76defece1649bf.tar.bz2
Make sure exited preprocessor gets cleaned up when running with PID 1.
This restores the fix introduced by commit 5f2769a0 and inadvertently removed in 0b425c88. * src/pies.c (init_detect): Set up SIGCHLD no if pid is 1, no matter what the value of PIES_SYSVINIT_ENABLED.
-rw-r--r--src/pies.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/pies.c b/src/pies.c
index f033019..21a31fa 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -2395,14 +2395,17 @@ no_init_option (int argc, char **argv)
static void
init_detect (int argc, char **argv)
{
- init_process = PIES_SYSVINIT_ENABLED && getpid () == 1;
-
- if (init_process)
+ if (getpid () == 1)
{
int s[] = { SIGCHLD };
setsigvhan (sigchld_early, s, 1);
- if (no_init_option (argc, argv) || is_docker ())
- init_process = 0;
+
+ init_process = PIES_SYSVINIT_ENABLED;
+ if (init_process)
+ {
+ if (no_init_option (argc, argv) || is_docker ())
+ init_process = 0;
+ }
}
}

Return to:

Send suggestions and report system problems to the System administrator.