Reattach to a running process to read the standard output in Windows with named pipe

308 Views Asked by At

I want to start a random child process and let it run even if the parent process exit later.

It should be possible to read the standard output in none-blocking manner from the child process even if the parent has exited. Another proces should be able to reconnect and read the standard output from the running child process.

I have achieved all that in Unix with mkfifo and open with C Programming Language .

I have achieved almost the same in Windows with CreateNamedPipeA , CreateFile and CreateProcess.

But in Windows when the parent process exit, i don't know how to reconnect to the already running child process so i can read the standard output instead of starting a new child process.

Can someone please guide me on how to do that in Windows? if that even is possible.

0

There are 0 best solutions below