How To Test Redirected Standard Handles of Another Process
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Based on the article "How to spawn console processes with redirected standard handles" found at http://support.microsoft.com/default.aspx?scid=kb;en-us;190351 I realize that in order to see whether the spawned process is terminated, the author use the returned code from WriteFile. If the WriteFile fail to write at the redirected standard handles of another process and the error code is ERROR_NO_DATA, that's mean the pipe was closed through normal child process termination. However, is there any way to check whether the pipe is still connected to an alived process, without explicitly WriteFile through that pipe. i.e. bool IsPipeStillConnectedToAliveProcess (HANDLE pipeHandle); Thank you very much! cheok