I have written software (C#. NET console app) to run on all of our Dedicated Servers that will manage individual Java processes (start/stop/restart them among other things). The problem I run into is that when my application does crash, it does not shutdown the Java sub-process that it launched. I need to make sure this is terminated prior to my application crashing (not a normal thing, but definitely something I need to add incase).
Would the AppDomain.UnhandledException method be better suited for this, or RegisterApplicationRecoveryCallback? I noticed on some other questions here, there were some caveats listed for UnhandledException, so I am curious as to what the the best approach would be for this?
i don’t know how your code looks but you could do it in a try finally as the finally is always executed!