Message223828
> Do Popen.write_nonblocking() and Popen.read_nonblocking() methods
> belong to the second category? Should they raise BrokenPipeError?
IMO when you write directly to stdin and read from stdout/stderr of a
child process, your code should be written to handle BrokenPipeError.
You must decide how to handle them. Otherwise, you have to poll
manually the child process using proc.poll() which is less efficient.
If you forget to poll the process, your program may enter an unlimited
loop which only occur in some cases (bug in the child process which
exits before reading the whole stdin input). |
|
Date |
User |
Action |
Args |
2014-07-24 11:45:05 | vstinner | set | recipients:
+ vstinner, gvanrossum, josiahcarlson, astrand, parameter, techtonik, giampaolo.rodola, ajaksu2, ooooooooo, v+python, r.david.murray, cvrebert, ericpruitt, akira, Andrew.Boettcher, rosslagerwall, sbt, martin.panter, janzert, yselivanov, eryksun |
2014-07-24 11:45:05 | vstinner | link | issue1191964 messages |
2014-07-24 11:45:04 | vstinner | create | |
|