summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Vignatti <tiago.vignatti@nokia.com>2010-08-05 21:06:33 +0300
committerTiago Vignatti <tiago.vignatti@nokia.com>2010-08-05 21:06:33 +0300
commit17349d8b86b7cfe8a50fc968695df77585a73064 (patch)
tree0ec8f0b7f3c66c116efc9467fa5cda7ebf01f978
parent08448fe46dc9caf17bf87d05c7f89b107d44a6d8 (diff)
os: add only once input pipe for main Select()
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r--os/WaitFor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/os/WaitFor.c b/os/WaitFor.c
index 3a6c3cbb3..eb4c8b5cd 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -164,6 +164,10 @@ WaitForSomething(int *pClientsReady)
FD_ZERO(&clientsReadable);
+ /* watch for input thread updates, so the main thread can proceed with the
+ * processing of events */
+ AddEnabledDevice(InputThreadReadPipe);
+
/* We need a while loop here to handle
crashed connections and the screen saver timeout */
while (1)
@@ -232,8 +236,7 @@ WaitForSomething(int *pClientsReady)
{
#ifdef INPUT_THREAD
/* Empty the signaling pipe */
- if (PipeRead(InputThreadReadPipe) > 0)
- AddEnabledDevice(InputThreadReadPipe);
+ PipeRead(InputThreadReadPipe);
#endif
i = Select (MaxClients, &LastSelectMask, NULL, NULL, wt);
}