aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2009-07-26 20:26:14 +0000
committerFrederic Culot <calcurse@culot.org>2009-07-26 20:26:14 +0000
commitbccd37ef968dc07c2e3435123deba3e541662e0c (patch)
treeae3db9b611497a9229f3624fdb910b81920cc1ca /src/utils.c
parent3d23af73c0032ad08766d2375fd9827493a7d658 (diff)
downloadcalcurse-bccd37ef968dc07c2e3435123deba3e541662e0c.tar.gz
calcurse-bccd37ef968dc07c2e3435123deba3e541662e0c.zip
--status flag added
Diffstat (limited to 'src/utils.c')
-rwxr-xr-xsrc/utils.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/utils.c b/src/utils.c
index e825196..b4e7a93 100755
--- a/src/utils.c
+++ b/src/utils.c
@@ -1,4 +1,4 @@
-/* $calcurse: utils.c,v 1.79 2009/07/26 12:47:16 culot Exp $ */
+/* $calcurse: utils.c,v 1.80 2009/07/26 20:26:16 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -64,7 +64,7 @@
void
exit_calcurse (int status)
{
- int remove_lock;
+ int was_interactive;
if (ui_mode == UI_CURSES)
{
@@ -73,10 +73,10 @@ exit_calcurse (int status)
refresh ();
endwin ();
ui_mode = UI_CMDLINE;
- remove_lock = 1;
+ was_interactive = 1;
}
else
- remove_lock = 0;
+ was_interactive = 0;
calendar_stop_date_thread ();
io_stop_psave_thread ();
@@ -93,14 +93,13 @@ exit_calcurse (int status)
notify_free_app ();
keys_free ();
mem_stats ();
- if (remove_lock)
+ if (was_interactive)
{
if (unlink (path_cpid) != 0)
EXIT (_("Could not remove calcurse lock file: %s\n"),
- strerror (errno));
+ strerror (errno));
+ dmon_start (status);
}
-
- dmon_start (status);
exit (status);
}