From 8c41029c5de726a4f4866f5f57962fd4617cc0e6 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Mon, 3 Apr 2017 14:54:47 +0200 Subject: [PATCH] terminology: change cwd to root so we are not depending on the directory we are started in --- src/bin/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bin/main.c b/src/bin/main.c index 0f2f7e5b..62f8f916 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -874,6 +874,16 @@ remote: if (ipc_instance_add(&inst)) goto end; } + else + { + if (!cd) + { + char buf[PATH_MAX]; + getcwd(buf, sizeof(buf)); + + cd = strdup(buf); + } + } if ((!single) && (config->multi_instance)) { ipc_instance_new_func_set(main_ipc_new);