How can I read from output PIPE multiple times without using process.communicate() as communicate closes the PIPE after reading the output but I need to have sequential inputs and outputs.
For example,
1) process.stdin.write('input_1')
2) After that, I need to read the output PIPE
(how can I accomplish that without using communicate as it closes the PIPE
) and then give another input as
3) process.stdin.write('input_2')
4) And then read the output of step 3
But if I use process.communicate
after giving first input then it closes the output PIPE
and i am unable to give second input as the PIPE
is closed.
Kindly help please.