From 0d74c14fd19adcf87103b1fc8815c1901ea9f67a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 19 Oct 2016 18:17:08 +0200 Subject: 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 Signed-off-by: Lukas Fleischer --- src/args.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/args.c b/src/args.c index afb4bfc..f4eaba7 100644 --- a/src/args.c +++ b/src/args.c @@ -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 */ -- cgit v1.2.3