How to prevent BrokenPipeError when doing a flush in Python?
The BrokenPipeError is normal as said phantom because the reading process (head) terminates and closes its end of the pipe while the writing process (python) still tries to write. Is is an abnormal condition, and the python scripts receives a BrokenPipeError – more exactly, the Python interpreter receives a system SIGPIPE signal that it catches … Read more