Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deadman Switch for EXE COM Server
Message
From
13/11/2012 10:53:59
 
 
To
12/11/2012 16:05:21
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01556995
Message ID:
01557025
Views:
76
>I have a VFP app that calls a separate EXE COM server. The purpose of the COM server is to obtain and hold an FLOCK() on a production DBF or DBC file.
>
>Because it is in a separate process (and it must be a separate process, an in-process DLL COM server doesn't work), there is a possibility it could continue to run and hold an FLOCK() on a production table or DBC in the event of the main app crashing in the wrong place. Since the main app runs unattended 24/7, that would be a Very Bad Thing.
>
>I was thinking of including some sort of watchdog timer/deadman switch in the COM EXE, so it will commit suicide if the parent app doesn't exist or respond (?) within some reasonable amount of time.
>
>Ideas, anyone?

I don't know if that helps you in your situation, but in a similar situation I did the following:
The main application creates a file every x minutes on a certain location. The called application that depends on the main application checks if that file exists, and if so, it evaluates the datetime of the create time of that file. If that file is older than a few minutes, the application knows that the crucial app is non-responsive or is not running at all and takes proper action.
Christian Isberner
Software Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform