[Bug 793] ulogd -d does not close all fds
bugzilla-daemon at bugzilla.netfilter.org
bugzilla-daemon at bugzilla.netfilter.org
Fri Jun 29 16:34:44 CEST 2012
http://bugzilla.netfilter.org/show_bug.cgi?id=793
--- Comment #2 from Joan Touzet <joant at cloudant.com> 2012-06-29 16:34:43 CEST ---
Why not? When you fork you should not be assuming any other fd is open, nor
carrying it with you. Name one example of where you *don't* want to close a
passed in fd. The code I pasted is from the daemonization of
In our case, the call stream looks something like:
cron
\-> /usr/bin/flock --timeout 300 /var/lock/chef-client --command
'/usr/bin/chef-client' >/dev/null 2>&1
\-> Install /etc/ulogd.conf, contents below
\-> /usr/sbin/invoke-rc.d ulogd start
\-> (debian) start-stop-daemon --quiet --start -exec /usr/sbin/ulogd --
-d
\-> ulogd continues to hold an fd on /var/lock/chef-client
\-> chef-client never runs again because the flock is never released
Our ulogd configuration:
#######################################################################
# Cloudant ulogd configuration
# v1.0.0 - 2012-06-01 - joant
#######################################################################
[global]
nlgroup=1
logfile="/var/log/ulog/ulogd.log"
# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8)
loglevel=5
rmem=131071
bufsize=150000
plugin="/usr/lib/ulogd/ulogd_BASE.so"
plugin="/usr/lib/ulogd/ulogd_LOGEMU.so"
[LOGEMU]
file="/var/log/ulog/syslogemu.log"
sync=0
Our workaround: chef-client invokes ulogd this way instead:
exec 3>&- && /usr/sbin/invoke-rc.d ulogd start
--
Configure bugmail: http://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.
You are watching someone on the CC list of the bug.
More information about the netfilter-buglog
mailing list