This signal is raised when a program writes to a socket or fifo that has no readers. The default action of this signal is to cause the program to terminate.
After "head" has printed out the first 10 lines and quits, "cat" will get a pipe error. However, cat catches the signal and quits gracefully. If you pipe the output of some cvs(1) commands into less(1) and quit, then you might see the shell print out a message as cvs doesn't handle this signal gracefully.
Another example, using strace(1) to show system calls:
$ strace ls /etc | echo execve("/bin/ls", [["ls", "/etc"], [[/* 52 vars */]) = 0 ... write(1, "a2ps\nadjtime\napache2\napm\nasound."..., 1593) = -1 [EPIPE] (Broken pipe) --- SIGPIPE (Broken pipe) @ 0 (0) --- +++ killed by SIGPIPE +++ $
If you get this message when writing to a socket, it can be avoided by passing MSG_NOSIGNAL as a flag to send() or ignoring the signal by using signal(SIGPIPE,SIG_IGN);
9 pages link to SIGPIPE: