diff options
author | Ermal <eri@pfsense.org> | 2013-02-13 18:17:04 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-02-13 18:19:18 +0000 |
commit | fba1804f83ee771f82465dfced1497e352d97b30 (patch) | |
tree | 39a2e75a447883242955a6c441910ecb80dc071d /etc | |
parent | 87613be46dc1909e173cd8194f08e5364b5699ac (diff) | |
download | pfsense-fba1804f83ee771f82465dfced1497e352d97b30.zip pfsense-fba1804f83ee771f82465dfced1497e352d97b30.tar.gz |
Assign the output of exec to a var to avoid any issues
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/util.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index 33914ae..6286572 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 */ |