From: Michael Date: Tue, 18 Apr 2017 17:17:15 +0000 (+0000) Subject: Issue 3351: Check if resource was created X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=806f395724dbf472f1aaa9e7335ffeaea70b0ff0;p=friendica.git Issue 3351: Check if resource was created --- diff --git a/boot.php b/boot.php index becb9bd570..c44599477a 100644 --- a/boot.php +++ b/boot.php @@ -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); } /**