Skip to content

Commit

Permalink
Debug exec async
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 23, 2024
1 parent 2933875 commit 03fcf37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,10 @@ function execAsync($command) {
$pid = exec($command, $output, $retval);
error_log('execAsync: ' . json_encode($output) . ' ' . $retval);
} else {
$pid = exec($command . " > /dev/null 2>&1 & echo $!; ");
$newCmd = $command . " > /dev/null 2>&1 & echo $!; ";
error_log('execAsync start: ' . $newCmd);
$pid = exec($newCmd, $output, $retval);
error_log('execAsync end : ' . json_encode($output) . ' ' . $retval);
}
return $pid;
}
Expand Down

0 comments on commit 03fcf37

Please sign in to comment.