diff options
author | Guillem Jover <guillem@debian.org> | 2008-04-11 04:35:52 +0000 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2010-06-10 23:21:22 +0200 |
commit | c57976b73376c621c31d64110860ed0c29116a68 (patch) | |
tree | bb9bc0ad78ab0b11f5320244b0b59f58bbac73ce /debian/patches | |
parent | 6ddf988f44cd30be0cea66e1712a3b2103e4fc88 (diff) | |
download | inetutils-c57976b73376c621c31d64110860ed0c29116a68.tar.gz |
Fix a race condition when setting the SIGALRM signal in syslogd parent
When starting the daemon it was causing the parent to exit with a
non-zero status.
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/52_sigalarm.patch | 42 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/52_sigalarm.patch b/debian/patches/52_sigalarm.patch new file mode 100644 index 0000000..848db19 --- /dev/null +++ b/debian/patches/52_sigalarm.patch @@ -0,0 +1,42 @@ +Index: b/syslogd/syslogd.c +=================================================================== +--- a/syslogd/syslogd.c 2008-04-11 06:58:34.000000000 +0300 ++++ b/syslogd/syslogd.c 2008-04-11 07:16:16.000000000 +0300 +@@ -268,6 +268,7 @@ void cfline (const char *, struct filed + const char *cvthname (struct sockaddr_in *); + int decode (const char *, CODE *); + void die (int); ++void doexit (int); + void domark (int); + void fprintlog (struct filed *, const char *, int, const char *); + static int load_conffile (const char *, struct filed **); +@@ -477,6 +478,7 @@ main (int argc, char *argv[]) + + IMO, the GNU/Linux distributors should fix there booting + sequence. But we still keep the approach. */ ++ signal (SIGTERM, doexit); + ppid = waitdaemon (0, 0, 30); + if (ppid < 0) + { +@@ -623,7 +625,7 @@ main (int argc, char *argv[]) + /* If we're doing waitdaemon(), tell the parent to exit, + we are ready to roll. */ + if (ppid) +- kill (ppid, SIGALRM); ++ kill (ppid, SIGTERM); + + for (;;) + { +@@ -1553,6 +1555,12 @@ logerror (const char *type) + } + + RETSIGTYPE ++doexit (int signo ARG_UNUSED) ++{ ++ exit (0); ++} ++ ++RETSIGTYPE + die (int signo) + { + struct filed *f; diff --git a/debian/patches/series b/debian/patches/series index aaff394..77152c6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,4 @@ 43_ret_converted_to_int.patch -p0 50_split_load_conffile.patch 51_add_load_confdir_support.patch +52_sigalarm.patch |