sigpipe

Ignoring Bash pipefail for error code 141

Ignoring Bash pipefail for error code 141 Question: Setting the bash pipefail option (via set -o pipefail) allows the script to fail if a non-zero error is caught where there is a non-zero error in any step of a pipe. However, we are running into SIGPIPE errors (error code 141), where data is written to …

Total answers: 5

IOError: [Errno 32] Broken pipe when piping: `prog.py | othercmd`

IOError: [Errno 32] Broken pipe when piping: `prog.py | othercmd` Question: I have a very simple Python 3 script: f1 = open(‘a.txt’, ‘r’) print(f1.readlines()) f2 = open(‘b.txt’, ‘r’) print(f2.readlines()) f3 = open(‘c.txt’, ‘r’) print(f3.readlines()) f4 = open(‘d.txt’, ‘r’) print(f4.readlines()) f1.close() f2.close() f3.close() f4.close() But it always says: IOError: [Errno 32] Broken pipe I saw on …

Total answers: 10