I'm trying to spawn a process using following statement
$cmd = "Hello.scala";
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
$process = proc_open($cmd, $descriptorspec, $pipes, $cwd, null);
through PHP script. I'm using spawned process to execute a simple Scala program and capturing program's output. But unfortunately I'm not getting success. Child process runs successfully but after few seconds its getting terminated due to sigterm signal.
$stat = proc_get_status($process);
if ($stat['signaled'] && $stat['termsig'] == 9){
echo "Process got sigterm";
}
finally its printing Process got sigterm. I tried all the way to increase CPU time using ulimit in httpd and I also tried to set max execution time but no success. I will really appreciate any help on this.