diff options
author | Lukas Fleischer <lfleischer@calcurse.org> | 2016-10-19 18:17:08 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@calcurse.org> | 2016-10-19 18:19:02 +0200 |
commit | 0d74c14fd19adcf87103b1fc8815c1901ea9f67a (patch) | |
tree | 84f90423a57679f6e5aa796f48f0d703a91b2508 /src/args.c | |
parent | 095576b945abee99ad4bcbd9f2e35f3137c22304 (diff) | |
download | calcurse-0d74c14fd19adcf87103b1fc8815c1901ea9f67a.zip |
Do not start the daemon more than once
Avoid starting multiple daemon instances if the --daemon argument is
passed and the daemon is already running. Terminate the already running
instance before spawning a new one instead.
Suggested-by: Vlad Glagolev <scm@vaygr.net>
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
Diffstat (limited to 'src/args.c')
-rw-r--r-- | src/args.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -803,6 +803,7 @@ int parse_args(int argc, char **argv) io_export_data(xfmt, export_uid); } else if (daemon) { notify_init_vars(); + dmon_stop(); dmon_start(0); } else { /* interactive mode */ |