[PATCH xserver 1/2] os: Ready clients with pending output aren't flushed, so set NewOutputPending

Keith Packard keithp at keithp.com
Wed Sep 21 23:53:45 UTC 2016


When a client with pending output is ready (has request data pending),
FlushAllOutput will skip it to get all of the requests processed
before sending any queued output. That means FlushAllOutput is going
to return with some output pending to a client which isn't known to be
write blocked. And that means NewOutputPending needs to be set so that
FlushAllOutput will get called again to actually go flush this client.

It might be interesting to try just flushing the client to send any
queued data along the way. This patch just restores the server
behavior to what it was before the ospoll changes.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 os/io.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/os/io.c b/os/io.c
index ff0ec3d..5ba1e86 100644
--- a/os/io.c
+++ b/os/io.c
@@ -615,7 +615,8 @@ FlushAllOutput(void)
         if (!client_is_ready(client)) {
             oc = (OsCommPtr) client->osPrivate;
             (void) FlushClient(client, oc, (char *) NULL, 0);
-        }
+        } else
+            NewOutputPending = TRUE;
     }
 }
 
-- 
2.9.3



More information about the xorg-devel mailing list