Upgrade BackgroundTask to support modified environment
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user