Broken pipe
has two causes:
The program is writing to a pipe, either because it's using a function like
popen()
or the script's output is redirected to a pipeline, and the program reading from the pipe exits (or closes its end of the pipe for some other reason).The program is writing to a network connection, and the connection is closed by the other end.