hi, for all those who had problems with SIGHUP processing, please try this patch: diff -u -r1.49 affile.c --- affile.c 2002/04/12 07:42:16 1.49 +++ affile.c 2002/04/26 09:28:07 @@ -894,7 +903,7 @@ if (self->flags & AFFILE_NO_EXPAND) { if (!self->writers) { - self->writers = make_affile_dest_writer(self, self->template_fname); + self->writers = make_affile_dest_writer(self, ol_string_use(self->template_fname)); res = LOG_HANDLER_INIT(self->writers, self->cfg, NULL); if (res & ST_QUIT) return NULL; The problem doesn't occur if your destination files have macros in their names. This might affect the 1.4 versions as well. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
Hi, This patch works fine for me. syslog-ng doesn't segfault anymore. Thanks a lot. However, when I send SIGHUP, syslog-ng recreate /dev/log socket. So klogd loses its connection: write(1, "<7>Apr 26 14:24:53 kernel: VFS: "..., 72) = -1 ECONNRESET (Connection reset by peer) read(0, "<4>end_request: I/O error, dev 0"..., 4095) = 159 time([1019823893]) = 1019823893 write(1, "<4>Apr 26 14:24:53 kernel: end_r"..., 81) = -1 ENOTCONN (Transport endpoint is not connected) time([1019823893]) = 1019823893 Do you have a solution ? On Fri, Apr 26, 2002 at 11:31:00AM +0200, Balazs Scheidler wrote:
hi,
for all those who had problems with SIGHUP processing, please try this patch:
diff -u -r1.49 affile.c --- affile.c 2002/04/12 07:42:16 1.49 +++ affile.c 2002/04/26 09:28:07 @@ -894,7 +903,7 @@
if (self->flags & AFFILE_NO_EXPAND) { if (!self->writers) { - self->writers = make_affile_dest_writer(self, self->template_fname); + self->writers = make_affile_dest_writer(self, ol_string_use(self->template_fname)); res = LOG_HANDLER_INIT(self->writers, self->cfg, NULL); if (res & ST_QUIT) return NULL;
The problem doesn't occur if your destination files have macros in their names. This might affect the 1.4 versions as well.
-- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
_______________________________________________ syslog-ng maillist - syslog-ng@lists.balabit.hu https://lists.balabit.hu/mailman/listinfo/syslog-ng
-- Jerome Peducasse Wanadoo Portails - Sophia Antipolis
On Fri, Apr 26, 2002 at 02:29:10PM +0200, Jerome Peducasse wrote:
Hi,
This patch works fine for me. syslog-ng doesn't segfault anymore. Thanks a lot.
However, when I send SIGHUP, syslog-ng recreate /dev/log socket. So klogd loses its connection:
write(1, "<7>Apr 26 14:24:53 kernel: VFS: "..., 72) = -1 ECONNRESET (Connection reset by peer) read(0, "<4>end_request: I/O error, dev 0"..., 4095) = 159 time([1019823893]) = 1019823893 write(1, "<4>Apr 26 14:24:53 kernel: end_r"..., 81) = -1 ENOTCONN (Transport endpoint is not connected) time([1019823893]) = 1019823893
Do you have a solution ?
I think this is more a klogd problem than syslog-ng. If klogd was using SOCK_STREAMS sockets (which it did previously), this would be fine. The syslog-ng related solution would be to implement keep_listener_alive(), but it's not yet implemented. -- Bazsi PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1
participants (2)
-
Balazs Scheidler
-
Jerome Peducasse