C++: can you set a timeout for a system call?
I've written a simple c++ program that creates, then executes an external script with the system() function.
The problem is that sometimes the script hangs (it's trying to get data from the interenet)... is there a way to call the script from my c++ program so that it times out after, say, 5 seconds?
|