ulogd segfault on kill TERM
Hi,
ulogd is segfaulting on kill TERM when logfile is set to 'syslog' in the configuration. Please find a patch below. Another point: Should stdout stay open on daemonize when logging to syslog ??
ulogd.c 2011-03-24 15:48:37.000000000 +0100 renamed from ulogd.c.orig 2011-03-24 15:45:34.000000000 +0100 +2 -2
@@ -1047,7 +1047,7 @@ unload_plugins(); #endif - if (logfile != NULL && logfile != stdout) { + if (logfile != NULL && logfile != stdout && logfile != &syslog_dummy ) { fclose(logfile); logfile = NULL; }
@@ -1228,7 +1228,7 @@ if (fork()) { exit(0); } - if (logfile != stdout && logfile != &syslog_dummy) + if (logfile != stdout ) fclose(stdout); fclose(stderr); fclose(stdin);
Cheers,
-salih
Quoted 4 lines · Salih Gönüllü
Hi,
ulogd is segfaulting on kill TERM when logfile is set to 'syslog' in the configuration. Please find a patch below.
I have applied the following patch.
Quoted 2 lines
Another point: Should stdout
stay open on daemonize when logging to syslog ??
this does make too much sense indeed.
Please, include a short description in your patches and add the Signed-off-by tag. This makes easier to apply it with git-am.
Thanks Salih!