added SIGUSR1 handler to rotate logs

This commit is contained in:
vvaltman 2014-09-10 01:01:22 +04:00
parent 4ec6e306a9
commit 1a921e70d4

3
main.c
View File

@ -650,9 +650,10 @@ int main (int argc, char **argv) {
if (daemonize) {
signal (SIGHUP, sighup_handler);
signal (SIGUSR1, sigusr1_handler);
reopen_logs ();
}
signal (SIGUSR1, sigusr1_handler);
if (!disable_output) {
printf (
"Telegram-cli version " TGL_VERSION ", Copyright (C) 2013-2014 Vitaly Valtman\n"