i think the kill signal you are sending from .net is 9 which means that there's no way to capture that signal, the whole process group will just immediately die. something like: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683155%28v=vs.85%29.aspx with a ctrl c signal (usually 2 in poxis but not sure in windows) can be captured.
another possibility is to send some kind of message to the child process through a pipe or similar and then let the OF app exit by calling ofExit(0) when it receives that message