Hi. I'm running dnsmasq on an embedded mipsel system (uClibc-0.9.29). Sometimes syslog
daemon is not activated for this system. When running dnsmasq without syslog it caches
its syslog messages and tries to send them continuous with some pause. This prevents
dnsmasq from exiting. Attached log shows an strace of dnsmaq when executing "killall
dnsmasq". After some time I start syslogd and dnsmasq sends its messages and exits.
_newselect(11, [3 5 6 7 8 9 10], [], [], NULL) = ? ERESTARTNOHAND (To be
restarted)
--- SIGTERM (Terminated) @ 0 (0) ---
getpid() = 5453
write(11, "\4\0\0\0\0\0\0\0", 8) = 8
sigreturn() = ? (mask now [ILL IOT CHLD STOP])
time(NULL) = 1278920479
stat64(0x425c98, 0x7fbf0a88) = 0
_newselect(11, [3 5 6 7 8 9 10], [], [], NULL) = 1 (in [10])
time(NULL) = 1278920479
read(10, "\4\0\0\0\0\0\0\0", 8) = 8
close(4) = 0
unlink("/var/run/dnsmasq/dnsmasq.pid") = 0
getpid() = 5453
time([1278920479]) = 1278920479
open("/etc/TZ", O_RDONLY) = 4
read(4, "CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00\n", 68) = 45
close(4) = 0
getpid() = 5453
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: started, version 2.55 cachesize
150\0", 71) = -1 ENOTCONN (Transport endpoint is not connected)
connect(12, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 ECONNREFUSED
(Connection refused)
nanosleep({0, 64000000}, NULL) = 0
...(repeated many times)
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: started, version 2.55 cachesize
150\0", 71) = -1 ENOTCONN (Transport endpoint is not connected)
connect(12, {sa_family=AF_FILE, path="/dev/log"}, 110) = -1 ECONNREFUSED
(Connection refused)
nanosleep({0, 1000000}, NULL) = 0
getpid() = 5453
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: started, version 2.55 cachesize
150\0", 71) = -1 ENOTCONN (Transport endpoint is not connected)
connect(12, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
getpid() = 5453
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: started, version 2.55 cachesize
150\0", 71) = 71
getpid() = 5453
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: compile time options: IPv6 GNU-getopt
no-DBus no-I18N DHCP TFTP\0", 99) = 99
getpid() = 5453
write(12, "<30>Jul 12 09:40:57 dnsmasq[5453]: asynchronous logging enabled, queue
limit is 10 messages\0", 92) = 92
getpid() = 5453
write(12, "<30>Jul 12 09:40:58 dnsmasq-dhcp[5453]: DHCP, IP range 192.168.178.20 --
192.168.178.200, lease time 12h\0", 105) = 105
getpid() = 5453
write(12, "<30>Jul 12 09:40:58 dnsmasq[5453]: reading /etc/resolv.conf\0", 60)
= 60
getpid() = 5453
write(12, "<30>Jul 12 09:40:58 dnsmasq[5453]: using nameserver
192.168.42.1#53\0", 68) = 68
getpid() = 5453
write(12, "<30>Jul 12 09:40:58 dnsmasq[5453]: read /etc/hosts - 3 addresses\0",
65) = 65
getpid() = 5453
write(12, "<30>Jul 12 09:40:58 dnsmasq-dhcp[5453]: read /etc/ethers - 1
addresses\0", 71) = 71
getpid() = 5453
write(12, "<30>Jul 12 09:41:19 dnsmasq[5453]: exiting on receipt of SIGTERM\0",
65) = 65
close(12) = 0
exit(0)
Is there a switch to avoid this behavior? "--log-async" doesn't seem to prevent
this.