summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/args.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/args.c b/src/args.c
index 20d3659..b1bf5ec 100644
--- a/src/args.c
+++ b/src/args.c
@@ -390,7 +390,7 @@ int parse_args(int argc, char **argv)
const char *cfile = NULL, *ifile = NULL, *confdir = NULL;
int non_interactive = 1;
- int ch;
+ int ch, cpid;
regex_t reg;
char buf[BUFSIZ];
struct tm tm;
@@ -743,6 +743,8 @@ int parse_args(int argc, char **argv)
status = 1;
break;
case OPT_DAEMON:
+ EXIT_IF(cpid = io_get_pid(path_cpid),
+ _("calcurse is running (pid = %d)"), cpid);
daemon = 1;
filter.type_mask = TYPE_MASK_APPT | TYPE_MASK_RECUR_APPT;
break;