I would begin with making sure you can kill() under Win32, which IIRC you cannot. If my memory is wrong and you can, then do it otherwise. Have your wrappers send a (handled) signal to your program. If your program is there to trap the signal, no error will be reported. If your program has been misteriously terminated, then the call to kill() will fail. Then the wrapper can commit suicide in a graceful manner.
You can also use a PIPE or socket to maintain some form of IPC with the wrappers, but this approach has more overhead. In any case, you should tune the mechanism in order to tradeoff the time it takes for wrappers to notice the parent is dead vs the resources that would be wasted by this polling.
Hope this helps.
Best regards
-lem, but some call me fokat
In reply to Re: Ways and means of killing Win32 processes
by fokat
in thread Ways and means of killing Win32 processes
by submersible_toaster
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |