Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 May : Hazards of Calling TerminateProcess too many times
| Subject: | Hazards of Calling TerminateProcess too many times |
| Posted by: | "Arjang" (arjangatmaildotc..@nottherealpart.zorg) |
| Date: | Sun, 1 May 2005 18:17:32 |
I have a process for performing batch operations. As each Files is processed
there
is a chance that a modal dialog box will be shown or some other unforseen
error happen.
The dialog boxes or the errors are from outside my program, so I have no
access to the source.
My problem is that once a modal dialog is shown the application hangs.
So I have a second Application that monitors the liveliness of the main app
by using Inter Procees Comunication.
After lets say 20 seconds if the Main application is not heard of, then we
assume it is hung and
it is shut down and restared by monitor application.
I use TerminateProcess to achieve this, how ever I have obsorved sometimes
after few hours the
system completely freezes.
How bad is this approach and what other choices do I have?
TIA
Arjang