Actions:
|
2011-08-03 16:25 AEST by Arthur Barrett - When clients run commands using CRunFile they often are programmed just to wait
until they are finished or receive an error/output.
But what if the program hangs?
Ideally the caller to the API should program for this case, by using
RunFile::wait() with a timeout, but even CServerConnection::Connect() uses an
infinite timeout.
We could try modifying CRunFile::wait() - if it's an infinite timeout, then use
some 'default' timeout instead and track output/cpu to see if the process
appears to be 'live'.
But that's quite prone to becoming messy.
Instead (or as a first step) we should review the code and remove all the
places that runfile is called with an infinite timeout (eg :
CServerConnection::Connect ) and supply a timeout and some suitable action if
_ServerOutput() hasn't been called after 1 minute... Oddly debugFn is not a
part of the callback so it's not as easy to handle that... |