9 Commits

Author SHA1 Message Date
Justin Maggard
138d03db19 Reload log file on SIGHUP
There's a report about a nightly "crash" when users download, compile
from source, and replace their distro's mindlnad binary.  This is because
the Debian package includes a patch that uses SIGUSR2 to reopen the log
file and sends SIGUSR2 from logrotate instead of just using the
"copytruncate" logrotate option.  Then logrotate sends SIGUSR2 at 6:25AM,
which causes us to abort due to the unhandled signal.

I don't want to sacrifice SIGUSR2 just for log rotation, especially when
we already do some reload operations on SIGHUP.  So to avoid this
Debian/Ubuntu issue, we'll explicitly ignore SIGUSR2, and add log file
reopening to the SIGHUP handler.  Then hopefully a future Debian package
version will remove the SIGUSR2 patch and use SIGHUP instead (or
copytruncate).

Fixes: SF Bug #313 (log rotation kills minidlna service)
2018-01-23 22:01:10 -08:00
Catalin Patulea
3a57744735 Add printf attribute to log_err/DPRINTF and fix a few warnings
Modified to not use %z for portability reasons.
2014-04-10 18:57:30 -07:00
Justin Maggard
aee83a3ee6 * Improve how we clean up after ourselves during exit. 2012-11-16 07:40:40 +00:00
Justin Maggard
0a0be0d96c * Add a MAXDEBUG log level. 2012-03-08 18:09:55 +00:00
Justin Maggard
a156e780a3 * Make the DPRINTF macro more robust. (Thanks Andrea Biardi) 2012-02-23 05:42:12 +00:00
Justin Maggard
bf173e27b4 * Change license text to reference the current FSF mailing address. 2011-06-21 02:08:21 +00:00
Justin Maggard
8e0fcd56f9 * Complete/clarify license information. 2010-11-11 23:48:14 +00:00
Justin Maggard
2da2f6d4a1 * Add some preliminary code for the eventual possibility of TiVo support. 2009-02-23 23:10:27 +00:00
Justin Maggard
45f294b404 * Use our own logging mechanism instead of syslog/printf. 2009-02-20 10:21:23 +00:00