[Bug 1366] New: atomicio doesn't poll()
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Fri Sep 21 04:04:36 EST 2007
http://bugzilla.mindrot.org/show_bug.cgi?id=1366
Summary: atomicio doesn't poll()
Product: Portable OpenSSH
Version: 4.7p1
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Miscellaneous
AssignedTo: bitbucket at mindrot.org
ReportedBy: ben at psc.edu
Created an attachment (id=1355)
--> (http://bugzilla.mindrot.org/attachment.cgi?id=1355)
Patch to fix atomicio and atomiciov non-polling spin
atomicio contains the following in the read/write loop:
-----
case -1:
#ifdef EWOULDBLOCK
if (errno == EINTR || errno == EWOULDBLOCK)
#else
if (errno == EINTR)
#endif
continue;
if (errno == EAGAIN) {
(void)poll(&pfd, 1, -1);
continue;
}
return 0;
-----
On systems where errno is set to EWOULDBLOCK we spin on the read or
write without polling. On many other systems (Linux, Solaris, IRIX,
...) EWOULDBLOCK is defined as EAGAIN, and when errno is set to EAGAIN
we spin on the read or write without polling.
Please see patch.
thanks,
--ben
--
Configure bugmail: http://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list