Francois Gouget : server: Make sock_check_pollhup() more reliable on Solaris.
Alexandre Julliard
julliard at winehq.org
Thu Apr 7 07:36:43 CDT 2011
Module: wine
Branch: stable
Commit: 277cf731bb53c9af6a40246c4c7aa23e3ceed946
URL: http://source.winehq.org/git/wine.git/?a=commit;h=277cf731bb53c9af6a40246c4c7aa23e3ceed946
Author: Francois Gouget <fgouget at free.fr>
Date: Fri Nov 26 18:08:30 2010 +0100
server: Make sock_check_pollhup() more reliable on Solaris.
(cherry picked from commit c4c03180b0868fe93de4a5ccf52ba76bb00ffcab)
---
server/sock.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/server/sock.c b/server/sock.c
index 9cd0fc2..196bca2 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -203,7 +203,8 @@ static sock_shutdown_t sock_check_pollhup(void)
pfd.events = POLLIN;
pfd.revents = 0;
- n = poll( &pfd, 1, 0 );
+ /* Solaris' poll() sometimes returns nothing if given a 0ms timeout here */
+ n = poll( &pfd, 1, 1 );
if ( n != 1 ) goto out; /* error or timeout */
if ( pfd.revents & POLLHUP )
ret = SOCK_SHUTDOWN_POLLHUP;
More information about the wine-cvs
mailing list