summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2017-02-25 11:01:56 +0100
committerUlrich Müller <ulm@gentoo.org>2017-02-25 11:09:40 +0100
commit68f375c77ece56bab9a0964b5891a04edc5acfdb (patch)
tree8aa104ddc6486eb5bea895394ec762140aad1fd7 /app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch
parentdev-libs/libsigsegv: Bumps version to 2.11 (diff)
downloadgentoo-68f375c77ece56bab9a0964b5891a04edc5acfdb.tar.gz
gentoo-68f375c77ece56bab9a0964b5891a04edc5acfdb.tar.bz2
gentoo-68f375c77ece56bab9a0964b5891a04edc5acfdb.zip
app-admin/cronolog: Move patch files to sane names.
Renaming to *.patch so we can call eapply with the directory. Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch')
-rw-r--r--app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch b/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch
new file mode 100644
index 000000000000..e7cc8be2c425
--- /dev/null
+++ b/app-admin/cronolog/files/1.6.2-patches/cronolog-sigusr1.patch
@@ -0,0 +1,46 @@
+*** a/src/cronolog.c.orig 2001-05-03 17:42:48.000000000 +0100
+--- b/src/cronolog.c 2003-08-15 14:03:17.000000000 +0100
+***************
+*** 84,95 ****
+--- 84,97 ----
+
+ #include "cronoutils.h"
+ #include "getopt.h"
++ #include <signal.h>
+
+
+ /* Forward function declaration */
+
+ int new_log_file(const char *, const char *, mode_t, const char *,
+ PERIODICITY, int, int, char *, size_t, time_t, time_t *);
++ void terminate_self(int);
+
+
+ /* Definition of version and usage messages */
+***************
+*** 306,311 ****
+--- 308,317 ----
+ DEBUG(("Rotation period is per %d %s\n", period_multiple, periods[periodicity]));
+
+
++ /* set up signal handlers to catch USR1 and HUP when restarting Apache */
++ signal(SIGUSR1, terminate_self);
++ signal(SIGHUP, terminate_self);
++
+ /* Loop, waiting for data on standard input */
+
+ for (;;)
+***************
+*** 416,418 ****
+--- 422,432 ----
+ }
+ return log_fd;
+ }
++
++ void terminate_self(int sig)
++ {
++ time_t time_now = time(NULL);
++ DEBUG(("%s (%d): received signal USR1; terminating.\n",
++ timestamp(time_now), time_now));
++ exit(6);
++ }