Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 23, 2024
1 parent 03fcf37 commit d974cc8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,7 @@ function isPIDRunning($pid) {
}

function execAsync($command) {
global $global;
// If windows, else
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
//$pid = system($command . " > NUL");
Expand All @@ -969,9 +970,10 @@ function execAsync($command) {
error_log('execAsync: ' . json_encode($output) . ' ' . $retval);
} else {
$newCmd = $command . " > /dev/null 2>&1 & echo $!; ";
error_log('execAsync start: ' . $newCmd);
$newCmd = $command . " > {$global['systemRootPath']}videos/avideo.log 2>&1 & ";
//error_log('execAsync start: ' . $newCmd);
$pid = exec($newCmd, $output, $retval);
error_log('execAsync end : ' . json_encode($output) . ' ' . $retval);
//error_log('execAsync end : ' . json_encode($output) . ' ' . $retval);
}
return $pid;
}
Expand Down

0 comments on commit d974cc8

Please sign in to comment.