Displaying 2 results from an estimated 2 matches for "signal_hup_handler".
2005 Feb 20
2
ices2 not re-connecting on live stream
On Sun, 2005-02-20 at 12:15, Fr?d?ric Bri?re wrote:
> I've been running ices2 like this 24/7 for months now, only restarting
> it once a week for log rotation. Never had a problem since.
setting <logsize> will cause an automatic log rotation when a certain
file size has been reached. It renames <logfile> to <logfile>.1 then
opens a new file <logfile>
karl.
2005 Feb 20
0
ices2 not re-connecting on live stream
...ntive to fix ices so
that it rotates logs on SIGHUP, which is much nicer. Here's the patch:
(The second LOG_INFO0, apart from verboseness, ensures that the new
logfile is created right away.)
--- ices2-2.0.0-kh59.orig/src/signals.c
+++ ices2-2.0.0-kh59/src/signals.c
@@ -51,9 +51,11 @@
void signal_hup_handler(int signum __attribute__((unused)))
{
LOG_INFO0("Flushing logs");
- log_flush(ices_config->log_id);
+ log_reopen(ices_config->log_id);
+ LOG_INFO0("Reloading playlist");
ices_config->next_track = 1;
+
signal(SIGHUP, signal_hup_handler);
}
@...