From 951e1de987d12304b0c79d682ef62c01f932b512 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Wed, 20 Jul 2016 20:33:54 +0200 Subject: [PATCH] Door: Redirect output to logfile And use nohup for detached call. Signed-off-by: Ralf Ramsauer --- doorlockd/lib/door.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doorlockd/lib/door.cpp b/doorlockd/lib/door.cpp index 46a5200..2a764ec 100644 --- a/doorlockd/lib/door.cpp +++ b/doorlockd/lib/door.cpp @@ -203,6 +203,6 @@ void Door::setDoorCallback(DoorCallback doorCallback) void Door::_exec_and_log(const std::string &filename) { - const std::string cmd = filename + " &"; + const std::string cmd = "nohup " + filename + " &>> " + _logfile_scripts; ::system(cmd.c_str()); }