aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS10
-rw-r--r--configure.ac2
-rw-r--r--src/pies.c13
3 files changed, 23 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 0c53fc9..f4c6efd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,17 @@
-GNU Pies NEWS -- history of user-visible changes. 2019-07-02
+GNU Pies NEWS -- history of user-visible changes. 2020-10-12
See the end of file for copying conditions.
Please send Pies bug reports to <bug-pies@gnu.org> or
<bug-pies@gnu.org.ua>
+Version 1.4.90 (git)
+
+* When running with PID 1, install SIGCHLD handler early
+
+This is to make sure the exited preprocessor command is cleaned up
+properly.
+
+
Version 1.4, 2019-07-02
* New option --no-init
diff --git a/configure.ac b/configure.ac
index e25ee6a..65dd50c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
# along with GNU Pies. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.63])
-AC_INIT([GNU Pies], [1.4], [bug-pies@gnu.org.ua])
+AC_INIT([GNU Pies], [1.4.90], [bug-pies@gnu.org.ua])
AC_CONFIG_SRCDIR([src/pies.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
diff --git a/src/pies.c b/src/pies.c
index 75285dc..a8529ac 100644
--- a/src/pies.c
+++ b/src/pies.c
@@ -1885,6 +1885,13 @@ sig_handler (int sig)
}
}
+RETSIGTYPE
+sigchld_early (int sig)
+{
+ while (waitpid (-1, NULL, WNOHANG) != -1)
+ ;
+}
+
void
setsigvhan (RETSIGTYPE (*handler) (int signo), int *sigv, int sigc)
{
@@ -2284,6 +2291,12 @@ main (int argc, char **argv)
set_quoting_style (NULL, shell_quoting_style);
init_process = getpid () == 1;
+ if (init_process)
+ {
+ int s[] = { SIGCHLD };
+ setsigvhan (sigchld_early, s, 1);
+ }
+
for (i = 1; i < argc; i++)
{
if (strcmp (argv[i], "--no-init") == 0)

Return to:

Send suggestions and report system problems to the System administrator.