diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2021-06-23 19:26:58 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2021-06-23 19:26:58 +0300 |
commit | 32b66872e62d69c96fb13cc23e76defece1649bf (patch) | |
tree | e8472659ffea9d1617be65ebba83b2d425ee2940 | |
parent | 70631fcb8a1e76aea231611d4a8b169da6cf1f56 (diff) | |
download | pies-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.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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; + } } } |