Updating link to change in openSUSE:Factory/syslogd revision 26.0
OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=b71c69326a4fead15fb6e6638eba4be3
This commit is contained in:
parent
1a29e73dcb
commit
259b1d222d
157
sysklogd-1.4.1-reload.dif
Normal file
157
sysklogd-1.4.1-reload.dif
Normal file
@ -0,0 +1,157 @@
|
|||||||
|
--- syslogd.c
|
||||||
|
+++ syslogd.c 2010-03-29 15:12:11.000000000 +0000
|
||||||
|
@@ -565,7 +565,7 @@ char **parts;
|
||||||
|
int inetm = 0;
|
||||||
|
static int debugging_on = 0;
|
||||||
|
static int nlogs = -1;
|
||||||
|
-static int restart = 0;
|
||||||
|
+static volatile sig_atomic_t restart;
|
||||||
|
|
||||||
|
#define MAXFUNIX 20
|
||||||
|
|
||||||
|
@@ -1096,6 +1096,7 @@ int main(argc, argv)
|
||||||
|
|
||||||
|
dprintf("Starting.\n");
|
||||||
|
init();
|
||||||
|
+ (void) signal(SIGHUP, sighup_handler);
|
||||||
|
#ifndef TESTING
|
||||||
|
if ( Debug )
|
||||||
|
{
|
||||||
|
@@ -1167,9 +1168,22 @@ int main(argc, argv)
|
||||||
|
(fd_set *) NULL, (struct timeval *) NULL);
|
||||||
|
if ( restart )
|
||||||
|
{
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
+ int omask = sigblock(sigmask(SIGHUP));
|
||||||
|
+#else
|
||||||
|
+ sigset_t blockhup;
|
||||||
|
+ sigemptyset(&blockhup);
|
||||||
|
+ sigaddset (&blockhup, SIGHUP);
|
||||||
|
+ (void) sigprocmask(SIG_BLOCK, &blockhup, NULL);
|
||||||
|
+#endif
|
||||||
|
+ restart = 0;
|
||||||
|
dprintf("\nReceived SIGHUP, reloading syslogd.\n");
|
||||||
|
init();
|
||||||
|
- restart = 0;
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
+ (void) sigsetmask(omask);
|
||||||
|
+#else
|
||||||
|
+ (void) sigprocmask (SIG_UNBLOCK, &blockhup, NULL);
|
||||||
|
+#endif
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (nfds == 0) {
|
||||||
|
@@ -1676,17 +1690,23 @@ void logmsg(pri, msg, from, flags)
|
||||||
|
register struct filed *f;
|
||||||
|
int fac, prilev;
|
||||||
|
int msglen;
|
||||||
|
-#ifndef SYSV
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
int omask;
|
||||||
|
#else
|
||||||
|
int lognum;
|
||||||
|
+ sigset_t nset, oset;
|
||||||
|
#endif
|
||||||
|
char *timestamp;
|
||||||
|
|
||||||
|
dprintf("logmsg: %s, flags %x, from %s, msg %s\n", textpri(pri), flags, from, msg);
|
||||||
|
|
||||||
|
-#ifndef SYSV
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
|
||||||
|
+#else
|
||||||
|
+ sigemptyset(&nset);
|
||||||
|
+ sigaddset (&nset, SIGHUP);
|
||||||
|
+ sigaddset (&nset, SIGALRM);
|
||||||
|
+ (void)sigprocmask(SIG_BLOCK, &nset, &oset);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1724,8 +1744,10 @@ void logmsg(pri, msg, from, flags)
|
||||||
|
(void) close(f->f_file);
|
||||||
|
f->f_file = -1;
|
||||||
|
}
|
||||||
|
-#ifndef SYSV
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
(void) sigsetmask(omask);
|
||||||
|
+#else
|
||||||
|
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -1789,8 +1811,10 @@ void logmsg(pri, msg, from, flags)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
-#ifndef SYSV
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
(void) sigsetmask(omask);
|
||||||
|
+#else
|
||||||
|
+ (void)sigprocmask(SIG_SETMASK, &oset, NULL);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#if FALSE
|
||||||
|
@@ -2108,7 +2132,7 @@ void wallmsg(f, iov)
|
||||||
|
(void) signal(SIGTERM, SIG_DFL);
|
||||||
|
(void) alarm(0);
|
||||||
|
(void) signal(SIGALRM, endtty);
|
||||||
|
-#ifndef SYSV
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
(void) signal(SIGTTOU, SIG_IGN);
|
||||||
|
(void) sigsetmask(0);
|
||||||
|
#endif
|
||||||
|
@@ -2178,14 +2202,14 @@ void wallmsg(f, iov)
|
||||||
|
void reapchild()
|
||||||
|
{
|
||||||
|
int saved_errno = errno;
|
||||||
|
-#if defined(SYSV) && !defined(linux)
|
||||||
|
+#if defined(SYSV) && !defined(_BSD_SOURCE)
|
||||||
|
(void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */
|
||||||
|
wait ((int *)0);
|
||||||
|
#else
|
||||||
|
while (waitpid(-1, (int*)0, WNOHANG|WUNTRACED) > 0)
|
||||||
|
;
|
||||||
|
#endif
|
||||||
|
-#ifdef linux
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
(void) signal(SIGCHLD, reapchild); /* reset signal handler -ASP */
|
||||||
|
#endif
|
||||||
|
errno = saved_errno;
|
||||||
|
@@ -2318,7 +2342,9 @@ void debug_switch()
|
||||||
|
{
|
||||||
|
dprintf("Switching debugging_on to %s\n", (debugging_on == 0) ? "true" : "false");
|
||||||
|
debugging_on = (debugging_on == 0) ? 1 : 0;
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
signal(SIGUSR1, debug_switch);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2350,7 +2376,9 @@ void die(int sig)
|
||||||
|
(void) snprintf(buf, sizeof(buf), "exiting on signal %d", sig);
|
||||||
|
errno = 0;
|
||||||
|
logmsg(LOG_SYSLOG|LOG_INFO, buf, LocalHostName, ADDDATE);
|
||||||
|
+#ifdef _BSD_SOURCE
|
||||||
|
signal(sig, SIG_IGN);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void dienow(void)
|
||||||
|
@@ -2664,7 +2692,6 @@ void init()
|
||||||
|
logmsg(LOG_SYSLOG|LOG_INFO, "syslogd " VERSION "." PATCHLEVEL \
|
||||||
|
": restart." , LocalHostName, ADDDATE);
|
||||||
|
#endif
|
||||||
|
- (void) signal(SIGHUP, sighup_handler);
|
||||||
|
dprintf("syslogd: restarted.\n");
|
||||||
|
}
|
||||||
|
#if FALSE
|
||||||
|
@@ -3061,7 +3088,9 @@ void sighup_handler()
|
||||||
|
|
||||||
|
{
|
||||||
|
restart = 1;
|
||||||
|
+#ifndef _BSD_SOURCE
|
||||||
|
signal(SIGHUP, sighup_handler);
|
||||||
|
+#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
@ -598,7 +598,7 @@
|
|||||||
(void) alarm(0);
|
(void) alarm(0);
|
||||||
(void) signal(SIGALRM, endtty);
|
(void) signal(SIGALRM, endtty);
|
||||||
+ (void) siginterrupt(SIGALRM,1); /* Make recvfrom() be able to receive EINTR */
|
+ (void) siginterrupt(SIGALRM,1); /* Make recvfrom() be able to receive EINTR */
|
||||||
#ifndef SYSV
|
#ifndef _BSD_SOURCE
|
||||||
(void) signal(SIGTTOU, SIG_IGN);
|
(void) signal(SIGTTOU, SIG_IGN);
|
||||||
(void) sigsetmask(0);
|
(void) sigsetmask(0);
|
||||||
@@ -2123,7 +2141,7 @@ void wallmsg(f, iov)
|
@@ -2123,7 +2141,7 @@ void wallmsg(f, iov)
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 29 16:48:18 CEST 2010 - werner@suse.de
|
||||||
|
|
||||||
|
- Do not lose signals during reseting signal flag (bnc#568150)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jan 19 11:31:32 CET 2010 - werner@suse.de
|
Tue Jan 19 11:31:32 CET 2010 - werner@suse.de
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ PreReq: coreutils %fillup_prereq klogd sed
|
|||||||
Provides: syslog
|
Provides: syslog
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 1.4.1
|
Version: 1.4.1
|
||||||
Release: 713
|
Release: 714
|
||||||
Summary: The Syslog daemon
|
Summary: The Syslog daemon
|
||||||
Source: sysklogd-1.4.1.tar.bz2
|
Source: sysklogd-1.4.1.tar.bz2
|
||||||
Source1: logrotate.syslog
|
Source1: logrotate.syslog
|
||||||
@ -59,6 +59,7 @@ Patch19: sysklogd-1.4.1-signal.dif
|
|||||||
Patch20: sysklogd-1.4.1-clearing.patch
|
Patch20: sysklogd-1.4.1-clearing.patch
|
||||||
Patch21: sysklogd-1.4.1-nofortify.patch
|
Patch21: sysklogd-1.4.1-nofortify.patch
|
||||||
Patch22: sysklogd-1.4.1-sysmap-prior-to-2.5.patch
|
Patch22: sysklogd-1.4.1-sysmap-prior-to-2.5.patch
|
||||||
|
Patch23: sysklogd-1.4.1-reload.dif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -126,6 +127,7 @@ Authors:
|
|||||||
%patch20 -p0 -b .clear
|
%patch20 -p0 -b .clear
|
||||||
%patch21 -p0 -b .nofortify
|
%patch21 -p0 -b .nofortify
|
||||||
%patch22 -p0 -b .sysmap
|
%patch22 -p0 -b .sysmap
|
||||||
|
%patch23 -p0 -b .reload
|
||||||
%patch0 -p0
|
%patch0 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user