(A UN*X signal:)
SIGPIPE is the "broken pipe" signal on UNIX, Linux, and the other Unixoids. It is sent to a process which tries to write to a pipe (or socket, or any similar stream) which the other side has already closed for reading. There is nothing which could be done with such data -- it must vanish.
TCP connections are modeled after UNIXy pipes, so it should come as no surprise that writing to a half-closed TCP connection will result in the OS delivering
Here's one way to generate
SIGPIPE in the comfort of your own $HOME. We shall use a named pipe (or fifo)...
$ mkfifo foo
If we write to
, the process will block
, waiting for a reader
(the data are still not lost!).
$ cat bar >foo &
a process which consumes no input
to "read" from
$ echo < foo