I am using multiprocessing
package to spawn a second process from which I would like to redirect stdout and stderr into the first process. I am using multiprocessing.Pipe
object:
dup2(output_pipe.fileno(), 1)
Where output_pipe
is an instance of multiprocessing.Pipe
. However, when I try to read on the other end, it just hangs. I tried reading using Pipe.recv_bytes
with a limit, but that raises an OSError
. Is this possible at all or should I just switch to some lower level pipe functions?