if(ch->fd < 0)
ch->fd = stdmkchild(ch->argv, chinit, idata);
if(sendreq(ch->fd, req, fd)) {
- if(errno == EPIPE) {
+ if((errno == EPIPE) || (errno == ECONNRESET)) {
/* Assume that the child has crashed and restart it. */
close(ch->fd);
ch->fd = stdmkchild(ch->argv, chinit, idata);
if(usr->fd < 0)
usr->fd = forkchild(usr->name);
if(sendreq(usr->fd, req, fd)) {
- if(errno == EPIPE) {
+ if((errno == EPIPE) || (errno == ECONNRESET)) {
/* Assume that the child has crashed and restart it. */
close(usr->fd);
usr->fd = forkchild(usr->name);