summaryrefslogtreecommitdiff
path: root/os/inputthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/inputthread.c')
-rw-r--r--os/inputthread.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/os/inputthread.c b/os/inputthread.c
index 40a044375..a4266e92d 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -127,24 +127,10 @@ InputThreadFillPipe(int writeHead)
{
int ret;
char byte = 0;
- fd_set writePipe;
- FD_ZERO(&writePipe);
-
- while (1) {
+ do {
ret = write(writeHead, &byte, 1);
- if (!ret)
- FatalError("input-thread: write() returned 0");
- if (ret > 0)
- break;
-
- if (errno != EAGAIN)
- FatalError("input-thread: filling pipe");
-
- DebugF("input-thread: pipe full\n");
- FD_SET(writeHead, &writePipe);
- Select(writeHead + 1, NULL, &writePipe, NULL, NULL);
- }
+ } while (ret < 0 && ETEST(errno));
}
/**