Issue 3351: Check if resource was created

This commit is contained in:
Michael 2017-04-18 17:17:15 +00:00
parent c02d801440
commit 806f395724

View file

@ -1367,11 +1367,15 @@ class App {
$cmdline = implode($args, " ");
if (get_config('system', 'proc_windows')) {
proc_close(proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__)));
$resource = proc_open('cmd /c start /b ' . $cmdline, array(), $foo, dirname(__FILE__));
} else {
proc_close(proc_open($cmdline . " &", array(), $foo, dirname(__FILE__)));
$resource = proc_open($cmdline . " &", array(), $foo, dirname(__FILE__));
}
if (!is_resource($resource)) {
logger('We got no resource for command '.$cmdline, LOGGER_DEBUG);
return;
}
proc_close($resource);
}
/**