PS: 如果服务器程序不忽略SIGPIPE,在某些时候TCP writer收到这个信号,会导致进程退出 The rule that applies is: When a process writes to a socket that has received an RST, the SIGPIPE signal is sent to the process. The default action of this signal is to terminate the process, so the
linux网络编程之socket(十):shutdown 与 close 函数的区别 http://blog.csdn.net/yijiu0711/article/details/17349169 socket中关闭套接字的函数close和shutdown区别 #include <unistd.h> int close(int fd); close 关闭了自身数据传输的两个方向.关闭本进程的socket id,但链接还是开着的,用这个socket id的其它进程还能用这个链接,能读或写这个s