summaryrefslogtreecommitdiff
path: root/src/dmon.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-07-23 18:33:20 +0000
committerFrederic Culot <calcurse@culot.org>2009-07-23 18:33:20 +0000
commitade0470197934fba87eb5113a7ecb2d542a6ed73 (patch)
tree3ec5a3f8b363c5ef84bdccbc761bb80edee57c9f /src/dmon.c
parentb55cad85dad5bd4bb81c92f6acaef7394b23d9b5 (diff)
downloadcalcurse-ade0470197934fba87eb5113a7ecb2d542a6ed73.zip
Functions added to implement a logging mechanism for calcurse daemon.
Diffstat (limited to 'src/dmon.c')
-rw-r--r--src/dmon.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/dmon.c b/src/dmon.c
index 5845cda..9aae65f 100644
--- a/src/dmon.c
+++ b/src/dmon.c
@@ -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 ());
}
}