出现broken pipe 的一种情况是向socket写数据,但是对端已经关闭socket连接,此时会触发SIGPIPE信号,该信号可以捕获。 signal(SIGPIPE, SIG_IGN); 相关文章: BrokenPipeError: [Errno 32] Broken pipe 2021-05-11 BrokenPipeError: [Errno 32] Broken pipe 2021-08-01 client_loop: send disconnect: Broken pipe 2021-12-27 Caused by: java.net.SocketException: Broken pipe 2021-11-21 解析org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe 2021-11-11 Broken pipe vs Connection reset Exception 2021-10-31