[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-cvs
Subject:    Francois Gouget : server: Make sock_check_pollhup() more reliable on
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2010-11-29 19:38:44
Message-ID: E1PN9Yi-00076w-8m () wine ! codeweavers ! com
[Download RAW message or body]

Module: wine
Branch: master
Commit: c4c03180b0868fe93de4a5ccf52ba76bb00ffcab
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c4c03180b0868fe93de4a5ccf52ba76bb00ffcab

Author: Francois Gouget <fgouget@free.fr>
Date:   Fri Nov 26 18:08:30 2010 +0100

server: Make sock_check_pollhup() more reliable on Solaris.

---

 server/sock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/sock.c b/server/sock.c
index 04ae748..d37a316 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;



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic