How would I add a timeout to the command (e.g. 10 seconds)?
How would I check the error level (e.g. 0, 1, etc)?
How would I read standard error?
Just quick, uncomplete answers (from .exe I guess you are on windows):
try using Timeout.timeout [1] but I’m not sure how successful
you’ll be - when the program blocks then you probably won’t be able to
do anything. When the timeout elapses, you’d need to kill the process.
use $? [2]
look for popen3 [3] or redirect stderr to stdout or a file. I’m not
sure whether popen3 works on windows.