[Bug 21387] NetTerm locks up

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Aug 3 12:38:39 CDT 2011


http://bugs.winehq.org/show_bug.cgi?id=21387

--- Comment #14 from Bruno Jesus <00cpxxx at gmail.com> 2011-08-03 12:38:38 CDT ---
The first link conclusion is that we should check for both POLLIN and POLLHUP
on reading, this my patch does =)
After reading both links my conclusion is that I should remove the !POLLERR
from both read/write making something like this:

  for (i = k = 0; i < readfds->fd_count; i++, j++)
-   if (fds[j].revents)
+   if ((fds[j].revents&(POLLIN|POLLHUP)))


  for (i = k = 0; i < writefds->fd_count; i++, j++)
-   if (fds[j].revents)
+   if ((fds[j].revents&POLLOUT) && !(fds[j].revents&POLLHUP))

It's still necessary to test !POLLHUP on write because otherwise it would
return an FD in error state (false-positive connection).

I'm reading more about conformance tests but AFAIK I read something about that
MSG_PEEK test already implemented (or in process of being commited) in current
git.

Sorry about the patch format, I'm still starting on all this git stuff.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list