diff options
author | Frederic Culot <calcurse@culot.org> | 2009-07-23 18:33:20 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2009-07-23 18:33:20 +0000 |
commit | ade0470197934fba87eb5113a7ecb2d542a6ed73 (patch) | |
tree | 3ec5a3f8b363c5ef84bdccbc761bb80edee57c9f /src/dmon.c | |
parent | b55cad85dad5bd4bb81c92f6acaef7394b23d9b5 (diff) | |
download | calcurse-ade0470197934fba87eb5113a7ecb2d542a6ed73.zip |
Functions added to implement a logging mechanism for calcurse daemon.
Diffstat (limited to 'src/dmon.c')
-rw-r--r-- | src/dmon.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $calcurse: dmon.c,v 1.1 2009/07/20 19:44:04 culot Exp $ */ +/* $calcurse: dmon.c,v 1.2 2009/07/23 18:33:20 culot Exp $ */ /* * Calcurse - text-based organizer @@ -59,6 +59,8 @@ static void dmon_sigs_hdlr (int sig) { notify_free_app (); + (void)io_fprintln (path_dmon_log, _("terminated at %s with signal %d\n"), + nowstr (), sig); exit (EXIT_SUCCESS); } @@ -165,7 +167,10 @@ dmon_start (int parent_exit_status) if (next.txt) mem_free (next.txt); - + + (void)io_fprintln (path_dmon_log, _("sleeping at %s for %d seconds\n"), + nowstr (), DMON_SLEEP_TIME); psleep (DMON_SLEEP_TIME); + (void)io_fprintln (path_dmon_log, _("awakened at %s\n"), nowstr ()); } } |