]> git.pld-linux.org Git - packages/anacron.git/commitdiff
- Exit gracefully also when receiving SIGTERM. Normally it does so when anacron-2_3-19
authormkochano <mkochano@pld-linux.org>
Tue, 19 Mar 2002 09:09:19 +0000 (09:09 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  signaled with SIGUSR1 and SIGTERM causes immediate exit without
  waiting for jobs being run to finish.

Changed files:
    anacron-SIGTERM.patch -> 1.1

anacron-SIGTERM.patch [new file with mode: 0644]

diff --git a/anacron-SIGTERM.patch b/anacron-SIGTERM.patch
new file mode 100644 (file)
index 0000000..356bb74
--- /dev/null
@@ -0,0 +1,25 @@
+diff -urN anacron-2.3.orig/main.c anacron-2.3/main.c
+--- anacron-2.3.orig/main.c    Fri Jun 23 00:58:07 2000
++++ anacron-2.3/main.c Tue Mar 19 10:04:03 2002
+@@ -265,6 +265,12 @@
+     sa.sa_mask = ss;
+     sa.sa_flags = 0;
+     if (sigaction(SIGUSR1, &sa, NULL)) die_e("sigaction error");
++    
++    /* setup SIGTERM handler */
++    sa.sa_handler = handle_sigusr1;
++    sa.sa_mask = ss;
++    sa.sa_flags = 0;
++    if (sigaction(SIGTERM, &sa, NULL)) die_e("sigaction error");
+ }
+ static void
+@@ -289,7 +295,7 @@
+       wait_signal();
+       if (got_sigchld) tend_children();
+       got_sigchld = 0;
+-      if (got_sigusr1) explain("Received SIGUSR1");
++      if (got_sigusr1) explain("Received SIGUSR1 or SIGTERM");
+       got_sigusr1 = 0;
+     }
+ }
This page took 0.034211 seconds and 4 git commands to generate.