I have this code:
$process = Process::fromShellCommandline('bash ./receive.sh \
url=' . env('SGW_URL') . ' \
cert=certs/privateKey.p12?' . env('SGW_CERT_PASS'),
'/var/www/sgwClientFiles/');
$process->run();
$process->getCommandLine();
if (!$process->isSuccessful()) {
throw new ProcessFailedException($process);
}
$process->stop(15);
return $process;
and it doesn't stop after 15sec. Instead, I get 'exceeded the timeout of 60 seconds' error.
The thing is, that a command which I try to run from command line doesn't stop itself and it has to be stopped from the script. Any ideas why the method "stop()" doesn't function properly?