1. RE: Silent Crash
- Posted by "Hance, Michael" <mhance at harris.com> Nov 06, 2003
- 495 views
Pete ... This is rare occasion for me to respond and lend a suggestion as my programming experience is only with EU as I am a network hardware engineer. However, I do similar work where the EU program must always work I handle the crash exceptions by generating my own " watchdog " so to speak. Its not elegant, but boy does it work. There are a couple of ways that work, and the concept is this : I have a small C program ( you can also write it in EU ) that's listens on a local loopback TCP/IP port on address 127.0.0.1 for time stamp updates from the main program, i.e. your control program. When it doesn't get an update , either the control program has crashed or windose has crashed, either way, I don't care, I just reboot the PC and all is fine. This technique never has failed me, and I have critical SATCOM equipment that MUST be monitored and controlled 24 x 7 x 365 , most of the time unattended. If you don't have TCP/IP, you can actually write time stamp out to " filename " which can be checked by a program to see that the filename ( which can be day,year,min,hour or whatever ) is " incrementing ". This also works. Anyway, just a couple of thoughts for you .... Best regards .. Mike -----Original Message----- From: Pete Stoner [mailto:pete.stoner at BTConnect.com] Sent: Thursday, November 06, 2003 9:58 AM To: EUforum at topica.com Subject: Silent Crash Hi All, I see this has been discussed in the past, but I'm looking for any way around it.. I am writing a (win32) program that will be running on an unattended PC locked in a machine room, my program is interfacing with an external commercial program. If it has a problem it cannot handle it closes itself down and after a time a monitor program (which checks if it is running) restarts it and (courtesy of Thomas Parslows 'Interprocess Communications') presses the 'Start' button so my program can retry.. If (as happens sometimes) the commercial program is hanging and needs a windose reboot then my program forces that (using Wizmo) and with the monitor program in the Start folder everything tries again.. My potential problem is if my program crashes - since there seems to be no way of getting a 'Silent' crash without the console msg as far as windose (and my monitor program) is concerned the failed program is still running (although 'not responding'). If this happens then unless someone actually checks the PC (either physically or remotely using TightVNC) we will not know it isn't running. I wonder if there is some way I can check for this (my monitor prog could then send me email or force a reboot to recover). The ideal solutions would be a Crash_routine, but this is not available (and has been discussed to death in the past), or even just an option to turn off the console msg and allow the program to close completely. The only way I can see at present would be to use Matts Modified Interpreter which seems to have this crash_routine option, but I really wanted to give them an exe file and it appears I cannot bind using this.. Any ideas? Pete. TOPICA - Start your own email discussion group. FREE!
2. RE: Silent Crash
- Posted by Pete_Stoner at BTConnect.com Nov 06, 2003
- 518 views
Michael, Thanks, I was thinking along the lines of 'How can I tell the program has died' I missed the obvious ' Check it is running'. I should be able to use the Interprocess library I already am including to do this...