Setting timeout for a process
I want to start an external application as a process from my C++ application.
After some timeout value, that external application should be terminated.
I followed the following algorithm:
hdl = pthread_create(mythread, NULL, RunThread, (void*)this);
Now, this is working for me. But when I provide the muCommand as "perl myscript.pl", the command never expired even after the timeout period.
I thought of using system command, it creates the process [perl myscript.pl] as a independent process and doesn't have control of that.
Can you please give me any solution to solve this problem?
Thanks in advance.