syslog support in rsync daemon has been broken since I added the "log
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index a2df930..146f1e5 100644 (file)
--- a/main.c
+++ b/main.c
@@ -36,7 +36,7 @@ static void report(int f)
        extern int do_stats;
 
        if (am_daemon) {
-               syslog(LOG_INFO,"wrote %.0f bytes  read %.0f bytes  total size %.0f\n",
+               rprintf(FLOG,"wrote %.0f bytes  read %.0f bytes  total size %.0f\n",
                       (double)stats.total_written,
                       (double)stats.total_read,
                       (double)stats.total_size);
@@ -544,7 +544,7 @@ static int start_client(int argc, char *argv[])
 }
 
 
-RETSIGTYPE sigusr1_handler(int val) {
+static RETSIGTYPE sigusr1_handler(int val) {
        exit_cleanup(1);
 }
 
@@ -584,6 +584,7 @@ int main(int argc,char *argv[])
        signal(SIGINT,SIGNAL_CAST sig_int);
        signal(SIGPIPE,SIGNAL_CAST sig_int);
        signal(SIGHUP,SIGNAL_CAST sig_int);
+       signal(SIGTERM,SIGNAL_CAST sig_int);
 
        if (am_daemon) {
                return daemon_main();