Reopen debug.log on SIGHUP
commit9af080c351c40a4f56d37174253d33a9f4ffdb69
authorMichael Hendricks <michael@ndrix.org>
Fri, 2 Mar 2012 19:31:16 +0000 (2 12:31 -0700)
committerMichael Hendricks <michael@ndrix.org>
Fri, 18 May 2012 22:20:03 +0000 (18 16:20 -0600)
treeb3b9f85c0f7cbca2ca880ba36a5e4bbca8e006d0
parentfea25712ca54c4715f874cf3d871e84bbfd83352
Reopen debug.log on SIGHUP

The best log rotation method formerly available was to configure
logrotate with the copytruncate option.  As described in the logrotate
documentation, "there is a very small time slice between copying the
file and truncating it, so some logging data might be lost".

By sending SIGHUP to the server process, one can now reopen the debug
log file without losing any data.
src/init.cpp
src/util.cpp
src/util.h