From 2ab208e45253aec114cc1be9bc75c9c17d6e16dc Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 8 Apr 2014 07:08:53 +0200 Subject: [PATCH] Fix invalid timeout for poll(). Fixes #5963 --- lib/base/process-unix.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/base/process-unix.cpp b/lib/base/process-unix.cpp index 3f47c0135..fba0068b7 100644 --- a/lib/base/process-unix.cpp +++ b/lib/base/process-unix.cpp @@ -127,7 +127,10 @@ void Process::IOThreadProc(int tid) } } - int rc = poll(pfds, count, timeout * 1000); + if (timeout != -1) + timeout *= 1000; + + int rc = poll(pfds, count, timeout); if (rc < 0) continue;