I have a Console App which creates/launches other sub-processes. I need to check somehow if itself or his ProcessChilds are went to deadlock, and kill the youngest of the associated process tree.
With this objective, his process childs, may have the same "kind of recursive" algorithm.
The idea is not to kill the youngest process but instead to get the youngest to suicide by command (in a sort of speak).
Is there a way I can call an async method inside the process (maybe the same method that should exist in his childs) to do that?
Well of course I could use a persistent file and a "WatchDog/KeepAliveLook" of that file and when it does not exist anymore they do it (suicide) but I'm convinced there's a cleaner way to do this.