From d7dfdadc147519c3a0b4ac88b24945aa370d94da Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Thu, 6 Oct 2011 22:54:07 +0100 Subject: [PATCH] Upgrade BackgroundTask to support modified environment --- source/lib/SihnonFramework/BackgroundTask.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/lib/SihnonFramework/BackgroundTask.class.php b/source/lib/SihnonFramework/BackgroundTask.class.php index 90c057f..69491e0 100644 --- a/source/lib/SihnonFramework/BackgroundTask.class.php +++ b/source/lib/SihnonFramework/BackgroundTask.class.php @@ -6,10 +6,10 @@ class SihnonFramework_BackgroundTask { } - public static function run($command) { + public static function run($command, $cwd=null, $env=null) { SihnonFramework_LogEntry::debug(SihnonFramework_Main::instance()->log(), "Running background task: {$command} &", 'default'); $pipes = array(); - $pid = proc_open($command . ' &', array(), $pipes); + $pid = proc_open($command . ' &', array(), $pipes, $cwd, $env); proc_close($pid); }