I have a executable and I want to run it using timeout. I am using linux server and php. Following is the code i am using
exec("timeout 2s ./exe < input > output");
It just produce output file with no content. But if I remove timeout as below:
exec("./exe < input > output");
then it shows the expected output in my output file.
Why this is happening. Am I using timeout in the right way. How to fix it?