Sorry, I thought it worked but I have realized that it dose not. Your solution only sleeps the process (stops it for 10 seconds), but what I really want is the process to be executed "in the background" and kill it after the mentioned 10 seconds. That is why I told that alarm() might...
Thank you very much, it works!!!
I am afraid my search into de Unix C manual has been unuseful, and I would have been lost for years. Had it not been for you...
Thanks again!!!
Hello everybody!
My problem is that I must execute an executable file. This one may hang - as it is a compiled Pascal program that might contain an infinite loop - , so I must limit its execution time to , let us say, 10 seconds. After that time, the process must be killed.
I am almost sure that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.