[syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE

Lowkrantz, Goran Goran.Lowkrantz@infologigruppen.se
Thu, 9 Dec 1999 19:39:54 +0100


Yes, this worked.

Cheers,
	GLZ

-----Original Message-----
From: Balazs Scheidler [mailto:bazsi@balabit.hu]
Sent: Thursday, December 09, 1999 7:01 PM
To: syslog-ng@venus.terrasoft.hu
Subject: Re: [syslog-ng] SIGHUP kills syslog-ng on FreeBSD 3-STABLE


On Wed, Dec 08, 1999 at 03:38:42AM +0100, Lowkrantz, Goran wrote:
> Hi,
> 
> No, it didn't help. Now it just dies silently, not even a work on the
> console.
> 
> The only thing I can see is that if I start the old syslogd immediately
> after syslog-ng died on HUP, I get the following on the console:
> syslogd: cannot create /var/run/log: Address already in use

I have yet another patch which should really fix your problems under BSD.
Touch afinet.c.x and afunix.c.x before rebuilding, if you don't have scsh
installed.

diff -urN syslog-ng-1.3.6/src/afinet.c syslog-ng.bsd/src/afinet.c
--- syslog-ng-1.3.6/src/afinet.c	Tue Nov 23 20:45:45 1999
+++ syslog-ng.bsd/src/afinet.c	Thu Dec  9 16:31:34 1999
@@ -269,11 +269,15 @@
 	case AFSOCKET_DGRAM: {
 		struct afsocket_source_connection *conn;
 		struct io_fd *client = make_io_fd(cfg->backend, fd);
+		int res;
 
 		self->super.num_connections = 1;
 		conn = make_afinet_source_connection(client, NULL,
&self->super, self->super.super.super.next);
-		LOG_HANDLER_INIT(conn, cfg, NULL);
-
+		res = LOG_HANDLER_INIT(conn, cfg, NULL);
+		if ((res & ST_FAIL) == 0) {
+			conn->queue_node = 
+
object_queue_add_tail(self->super.connections, &conn->super.super.super);
+		}
 		break;
 	}
 	default:
diff -urN syslog-ng-1.3.6/src/afunix.c syslog-ng.bsd/src/afunix.c
--- syslog-ng-1.3.6/src/afunix.c	Tue Nov 23 20:32:37 1999
+++ syslog-ng.bsd/src/afunix.c	Thu Dec  9 16:33:15 1999
@@ -241,11 +241,16 @@
 	case AFSOCKET_DGRAM: {
 		struct afsocket_source_connection *conn;
 		struct io_fd *client = make_io_fd(cfg->backend, fd);
-					
+		int res;
+				
 		self->super.num_connections = 1;
 		conn = make_afunix_source_connection(client, NULL,
&self->super, self->super.super.super.next);
-		LOG_HANDLER_INIT(conn, cfg, NULL);
-
+		res = LOG_HANDLER_INIT(conn, cfg, NULL);
+		
+		if ((res & ST_FAIL) == 0) {
+			conn->queue_node = 
+
object_queue_add_tail(self->super.connections, &conn->super.super.super);
+		}
 		break;
 	}
 	default:


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
     url: http://www.balabit.hu/pgpkey.txt

_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
http://lists.balabit.hu/mailman/listinfo/syslog-ng