summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3712d55db..003b235e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2534,10 +2534,12 @@ static void sighandler(int sig) { }
2534 sa.sa_flags = SA_RESTART; 2534 sa.sa_flags = SA_RESTART;
2535 (void)sigaction(SIGTERM, &sa, NULL); 2535 (void)sigaction(SIGTERM, &sa, NULL);
2536 if ((pid = fork()) == 0) { /* child */ 2536 if ((pid = fork()) == 0) { /* child */
2537 pid = getppid();
2537 sleep(1); 2538 sleep(1);
2538 kill(getppid(), SIGTERM); 2539 kill(pid, SIGTERM);
2539 sleep(1); 2540 sleep(1);
2540 kill(getppid(), SIGKILL); 2541 if (getppid() == pid) /* if parent did not exit, shoot it */
2542 kill(pid, SIGKILL);
2541 exit(0); 2543 exit(0);
2542 } else { /* parent */ 2544 } else { /* parent */
2543 r = select(0, NULL, NULL, NULL, NULL); 2545 r = select(0, NULL, NULL, NULL, NULL);