Hi,
In my app I create and run a child process (console program) and write
to its standard input through a pipe using WinAPI WriteFile function.
Writing to the pipe is blocking (WriteFile does not return until all
bytes are written) and this operation can be long because the child
process "eats" incoming data and processes it.
The problem occurs, when during writing to the pipe (executing
WriteFile) the child process is terminated (by user who can close
console window or kill the process with task manager, or by OS -
supposedly only, but it is possible, for example when critical error
occurs in child process). WriteFile does never return and the app is hung.
How to be informed that the child process has been terminated in this
situation?
Thanks,
mikk