[Bug 52] ssh hangs on exit

bugzilla-daemon at mindrot.org
Sun, 21 Jan 2007 08:52:49 -0000

------- Comment #34 from djm at mindrot.org  2007-01-21 19:52 -------
(In reply to comment #33)
> > 		errno = 0;
> > 		len = read(c->rfd, buf, sizeof(buf));
> >-		if (len < 0 && (errno == EINTR || errno == EAGAIN))
> >+		if (len < 0 && errno == EINTR)
>
> Can the second condition instead be made:
>
> && (errno == EINTR || c->detach_close || errno == EAGAIN)

meh, I meant:

&& (errno == EINTR || (errno == EAGAIN && !c->detach_close))