From fba1804f83ee771f82465dfced1497e352d97b30 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 13 Feb 2013 18:17:04 +0000 Subject: [PATCH] Assign the output of exec to a var to avoid any issues --- etc/inc/util.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 33914ae471..6286572663 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -1089,10 +1089,11 @@ function mwexec_bg($command, $clearsigmask = false) { $oldset = array(); pcntl_sigprocmask(SIG_SETMASK, array(), $oldset); } - exec("nohup $command > /dev/null 2>&1 &"); + $_gb = exec("nohup $command > /dev/null 2>&1 &"); if ($clearsigmask) { pcntl_sigprocmask(SIG_SETMASK, $oldset); } + unset($_gb); } /* unlink a file, if it exists */