corrected error with SIGPIPE signal

This commit is contained in:
cvs
2000-06-07 10:49:08 +00:00
parent eeeb82fedf
commit 34d407be43
2 changed files with 1 additions and 3 deletions

View File

@@ -124,10 +124,8 @@ int CocTryCmd(CocConn *conn) {
}
ERR_SI(send(conn->fd, conn->cmdbuf->buf, conn->cmdbuf->wrpos, 0));
ERR_I(CocRecv(conn->fd, conn->resbuf));
signal(SIGPIPE, SIG_DFL);
return(0);
OnError:
signal(SIGPIPE, SIG_DFL);
if (ErrCode==ECONNRESET || ErrCode==EPIPE) return(-2);
return(iret);
}