mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
add 'exec' to command call
This commit is contained in:
parent
e480fb6c6f
commit
086a231b1f
|
@ -79,7 +79,11 @@ class SeedDMS_Preview_Base {
|
||||||
$pipes = array();
|
$pipes = array();
|
||||||
|
|
||||||
$timeout += time();
|
$timeout += time();
|
||||||
$process = proc_open($cmd, $descriptorspec, $pipes);
|
// Putting an 'exec' before the command will not fork the command
|
||||||
|
// and therefore not create any child process. proc_terminate will
|
||||||
|
// then reliably terminate the cmd and not just shell. See notes of
|
||||||
|
// https://www.php.net/manual/de/function.proc-terminate.php
|
||||||
|
$process = proc_open('exec '.$cmd, $descriptorspec, $pipes);
|
||||||
if (!is_resource($process)) {
|
if (!is_resource($process)) {
|
||||||
throw new Exception("proc_open failed on: " . $cmd);
|
throw new Exception("proc_open failed on: " . $cmd);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user