In a command prompt window, I have a running process. While the process is still executing, I click the (red) 'X' in the corner of the command prompt window. The command prompt window closes, and the running process is terminated.
On Linux, closing the parent terminal of a running process will send that process SIGHUP
. How do I catch this event on Windows?