I am running test for a network program which uses TCP sockets. To verify a bug fix, I need to reproduce a \"Broken pipe\" error at the socket layer, but I don\'t know how. Any
A "Broken pipe" error message generally comes from the shell when it detects that a child it created has exited due to a SIGPIPE signal. So you can may be able to cause one manually by killing a child with a SIGPIPE (kill -PIPE %1
to kill the first background command).
SIGPIPE is generated by the kernel and sent to any process that tries to write to a pipe or socket after the other end has been closed.