rpms/sysklogd/devel sysklogd-1.4.2rh-startFailed.patch, NONE, 1.1 sysklogd-1.4.2rh-dispatcher.patch, 1.1, 1.2 sysklogd.spec, 1.54, 1.55

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon May 7 14:47:01 UTC 2007


Author: pvrabec

Update of /cvs/dist/rpms/sysklogd/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv17510

Modified Files:
	sysklogd-1.4.2rh-dispatcher.patch sysklogd.spec 
Added Files:
	sysklogd-1.4.2rh-startFailed.patch 
Log Message:
- fix realtime interface
- terminate parent of syslogd daemon on SIGCHLD


sysklogd-1.4.2rh-startFailed.patch:
 syslogd.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletion(-)

--- NEW FILE sysklogd-1.4.2rh-startFailed.patch ---
--- sysklogd-1.4.2rh/syslogd.c.startFailed	2007-05-07 15:49:48.000000000 +0200
+++ sysklogd-1.4.2rh/syslogd.c	2007-05-07 15:53:50.000000000 +0200
@@ -788,6 +788,7 @@
 void exit_signal_handler(int sig);
 #ifndef TESTING
 void doexit(int sig);
+void doExitFail(int sig);
 #endif
 void init();
 void cfline(char *line, register struct filed *f);
@@ -945,7 +946,8 @@
 		dprintf("Checking pidfile.\n");
 		if (!check_pid(PidFile))
 		{
-			signal (SIGTERM, doexit);
+			signal(SIGTERM, doexit);
+			signal(SIGCHLD, doExitFail);
 			if (fork()) {
 				/*
 				 * Parent process
@@ -962,6 +964,7 @@
 				exit(1);
 			}
 			signal (SIGTERM, SIG_DFL);
+			signal (SIGCHLD, SIG_DFL);
 			num_fds = getdtablesize();
 			for (i= 0; i < num_fds; i++)
 				(void) close(i);
@@ -2408,6 +2411,13 @@
 {
 	exit (0);
 }
+
+void doExitFail(sig)
+	int sig;
+{
+	exit (1);
+}
+
 #endif
 
 /*

sysklogd-1.4.2rh-dispatcher.patch:
 Makefile            |   10 +-
 sysklogd-dispatch.c |  190 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sysklogd-dispatch.h |   64 +++++++++++++++++
 sysklogd.8          |   24 ++++++
 syslogd.c           |   48 +++++++++++--
 5 files changed, 328 insertions(+), 8 deletions(-)

Index: sysklogd-1.4.2rh-dispatcher.patch
===================================================================
RCS file: /cvs/dist/rpms/sysklogd/devel/sysklogd-1.4.2rh-dispatcher.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sysklogd-1.4.2rh-dispatcher.patch	16 Apr 2007 18:15:26 -0000	1.1
+++ sysklogd-1.4.2rh-dispatcher.patch	7 May 2007 14:46:59 -0000	1.2
@@ -1,5 +1,5 @@
---- sysklogd-1.4.2rh/sysklogd.8.dispatcher	2007-04-16 19:27:44.000000000 +0200
-+++ sysklogd-1.4.2rh/sysklogd.8	2007-04-16 19:27:44.000000000 +0200
+--- sysklogd-1.4.2rh/sysklogd.8.dispatcher	2007-05-03 12:54:59.000000000 +0200
++++ sysklogd-1.4.2rh/sysklogd.8	2007-05-03 12:54:59.000000000 +0200
 @@ -30,6 +30,9 @@
  .RB [ " \-s "
  .I domainlist
@@ -46,7 +46,7 @@
  There is probably one important consideration when installing this
  version of syslogd.  This version of syslogd is dependent on proper
 --- /dev/null	2007-04-11 16:01:52.461576228 +0200
-+++ sysklogd-1.4.2rh/sysklogd-dispatch.h	2007-04-16 19:27:44.000000000 +0200
++++ sysklogd-1.4.2rh/sysklogd-dispatch.h	2007-05-03 12:54:59.000000000 +0200
 @@ -0,0 +1,64 @@
 +/* sysklogd-dispatch.h -- 
 + * Copyright 2007 Red Hat Inc., Durham, North Carolina.
@@ -113,7 +113,7 @@
 +
 +#endif
 --- sysklogd-1.4.2rh/Makefile.dispatcher	2007-02-26 10:46:08.000000000 +0100
-+++ sysklogd-1.4.2rh/Makefile	2007-04-16 19:30:48.000000000 +0200
++++ sysklogd-1.4.2rh/Makefile	2007-05-03 12:54:59.000000000 +0200
 @@ -10,6 +10,7 @@
  INSTALL = /usr/bin/install
  BINDIR = $(TOPDIR)/sbin
@@ -147,8 +147,8 @@
  ## Red Hat specific additions
  
 --- /dev/null	2007-04-11 16:01:52.461576228 +0200
-+++ sysklogd-1.4.2rh/sysklogd-dispatch.c	2007-04-16 19:27:44.000000000 +0200
-@@ -0,0 +1,185 @@
++++ sysklogd-1.4.2rh/sysklogd-dispatch.c	2007-05-03 13:07:51.000000000 +0200
+@@ -0,0 +1,190 @@
 +/* sysklogd-dispatch.c -- 
 + * Copyright 2007 Red Hat Inc., Durham, North Carolina.
 + * All Rights Reserved.
@@ -232,8 +232,13 @@
 +	pid = fork();
 +	switch(pid) {
 +		case 0:	// child
-+			dup2(disp_pipe[0], 0);
-+			close(disp_pipe[0]);
++			/* in case stdin was closed before sockerpair(),
++			   disp_pipe[0] --eq 0. It's usual because syslogd 
++			   run as daemon. */
++			if( disp_pipe[0] != 0 ) {
++				dup2(disp_pipe[0], 0);
++				close(disp_pipe[0]);
++			}
 +			close(disp_pipe[1]);
 +			setsid();
 +			execl(config->dispatcher, config->dispatcher, NULL);
@@ -334,8 +339,8 @@
 +	} else
 +		n_errs = 0;
 +}
---- sysklogd-1.4.2rh/syslogd.c.dispatcher	2007-04-16 19:27:44.000000000 +0200
-+++ sysklogd-1.4.2rh/syslogd.c	2007-04-16 19:27:44.000000000 +0200
+--- sysklogd-1.4.2rh/syslogd.c.dispatcher	2007-05-03 12:54:59.000000000 +0200
++++ sysklogd-1.4.2rh/syslogd.c	2007-05-03 12:54:59.000000000 +0200
 @@ -507,6 +507,8 @@
  #endif
  #include "version.h"


Index: sysklogd.spec
===================================================================
RCS file: /cvs/dist/rpms/sysklogd/devel/sysklogd.spec,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- sysklogd.spec	16 Apr 2007 18:15:26 -0000	1.54
+++ sysklogd.spec	7 May 2007 14:46:59 -0000	1.55
@@ -1,7 +1,7 @@
 Summary: System logging and kernel message trapping daemons
 Name: sysklogd
 Version: 1.4.2
-Release: 5%{?dist}
+Release: 6%{?dist}
 License: GPL
 Group: System Environment/Daemons
 URL: http://www.infodrom.org/projects/sysklogd/
@@ -16,6 +16,7 @@
 Patch1: sysklogd-1.4.2rh.timezone.patch
 Patch2: sysklogd-1.4.2rh-includeFacPri.patch
 Patch3: sysklogd-1.4.2rh-dispatcher.patch
+Patch4: sysklogd-1.4.2rh-startFailed.patch
 Conflicts: logrotate < 3.5.2
 Requires: logrotate
 Requires: bash >= 2.0
@@ -47,6 +48,7 @@
 %patch1 -p1 -b .timezone
 %patch2 -p1 -b .includeFacPri
 %patch3 -p1 -b .dispatcher
+%patch4 -p1 -b .startFailed
 
 %build
 make %{?_smp_mflags}
@@ -118,6 +120,10 @@
 %{_includedir}/sysklogd/sysklogd-dispatch.h
 
 %changelog
+* Thu May 03 2007 Peter Vrabec <pvrabec at redhat.com> 1.4.2-6
+- fix realtime interface 
+- terminate parent of syslogd daemon on SIGCHLD 
+
 * Mon Apr 16 2007 Peter Vrabec <pvrabec at redhat.com> 1.4.2-5
 - sysklogd provides new realtime interface (#236356) 
 




More information about the fedora-cvs-commits mailing list