Broken pipe

From Helpful

This article/section is a stub — probably a pile of half-sorted notes and assertions some of which may well be wrong, and not verified as a whole. Feel free to add or refine.

In linux, you can pipe data from program to program.


Programs writing to such pipes generally expect it to keep accepting data before it itself closes it or needs to write no further data. If the receiving side closes it before that time (or crashes, which means the same thing since the OS cleans up open file handles), the sending side will complain about a broken pipe the next time it tries to write.

A Ctrl-C while a piped command is executing is one way to get one of these.


Various programs write data through named pipes (filesystem FIFOs), in which case this error it may seem a lot vaguer.