I have two exec() function with timeout argument. eg:
<?php
exec("timeout 5 /usr/local/bin/trun 'uptime;ps -elf|grep httpd|wc -l;free -m;mpstat'",$t_uptime);
exec("timeout 5 /usr/local/bin/wrun 'uptime;ps -elf|grep httpd|wc -l;free -m;mpstat'",$t_uptime);
?>
Isn't working. I want exec()
stop after 5 sec and next exec()
function starts its execution.
Please correct this or give some alternative way to stop exec()
function