The client runs two "detection processes":
- GPU detection
- (Mac) check if in CPU emulation mode
The client was waiting indefinitely for these to exit.
If for some reason they don't exit, the client hangs.
Fix: wait no more than 10 sec for them to exit.
If still running, kill them and move on.
I took the opportunity to clean up the process-related code:
- add a time arg to get_exit_status().
If zero, wait indefinitely for the child to exit.
Else wait no more than that amount.
- get_exit_status() return an error code;
the exit status is returned via a parameter.
- run_program() no longer takes a time argument.
If you want to check for early exit, use get_exit_status()
- define PROCESS_ID as HANDLE (Win) or int (other)
so we can unify the process interface
- remove process_exists(). It wasn't used anywhere,
and get_exit_status(... 0) does the same thing.
- rename kill_program() to kill_process()
- don't use "prog" when you mean "pid"
Insteady of using its own XML input files,
the simulator now takes a client_state.xml file as input.
The simulator generates a synthetic workload based on the
projects, apps, app versions, WUs, and result it finds there.
This means that a user seeing aberrant behavior
can just send their client_state.xml file
and (hopefully) we can use the simulator to repro.
The simulator now can model GPUs.
As of this checkin, the simulator compiles but doesn't work.
There should be no change in the actual client.
svn path=/trunk/boinc/; revision=22409