The child process is a chess engine(stockfish), which you communicate using console normally.
I am trying to communicate with it through pipes. But when i attach the the write pipe the process gets terminated. Otherwise it is fine.
My question is when you create pipes to communicate with a process, should you give some sort of specific parameter for OS or should the child program be created specificly for this purpose? If not than this is a bug related to UE, most probably...
Here is the code, it is UE4 specific but still understandable.
I cannot (quickly) find Unreal docs for that particular function, but you need to make sure you are calling it exactly correctly. That asterisks are something of a red flag to me.
Also, I notice that you only specify WritePipe. What happened to ReadPipe?
Make sure you are connecting both the write and read pipes to the correct places:
Your read handle connects to the spawned process's write handle Your write handle connects to the spawned process's read handle
I actually considered maybe i am doing something wrong, so checked Unreal github for example process-pipe creation, but this is the way they also used for process creation with pipes at Unreal Engine source.
Also before this i knew nothing about process communication. So at the moment i am looking at every little detail that has a possibility.
So my question is, when using pipes, is there specific requirements for the process or should i give specific parameters for OS?