SetErrorMode will prevent errors from Windows regarding failed disk
acess or missing dlls, but It has no effect on the messages that are
a result of crash. (i.e can't read from or write to memory, invalid
instruction, etc). Those messages come from a default
ExceptionFilter that is wrapped around all of the threads in a
process. To get rid of the dialog boxes on memory access errors, you need to wrap your threads in a __try/__except that returns EXCEPTION_EXECUTE_HANDLER and have the handler call ExitProcess(error_code), instead of letting the default ExceptionFilter deal with the exceptions. Alternatively, you can call SetUnhandledExceptionFilter http://msdn.microsoft.com/en-us/library/ms680634(VS.85).aspx and provide a default filter that exits the process with an error code. The registry setting that you found basically changes the behavior of the system default exception filter. -tj On 5/18/2011 10:53 AM, Derrick Karimi wrote: Thanks for your input. I still need a check like you are talking about with cpu usage and kill-time. In particular I want to guard against programmer infinite loop bugs, or if they popped up a message box on purpose. They know they aren't supposed to pop up an error message explicitly in a job, actually they are supposed to call our wrapped versions of all API calls, which if resulting in a GUI will go through a switch that just logs in condor mode. |