summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmadeusz Sławiński <amade@asmblr.net>2020-02-03 23:38:48 +0100
committerAmadeusz Sławiński <amade@asmblr.net>2020-02-03 23:40:11 +0100
commitc2d797a3792a6e9ee4276600cc00f22e121bc8e2 (patch)
tree3d20ef8a0ed5321966f1f2b815914481e5acdbd6
parente25dd483daf03232bbe5749bb48cf874607e2db3 (diff)
downloadscreen-c2d797a3792a6e9ee4276600cc00f22e121bc8e2.tar.gz
Fix 100% cpu use on one core with poll
If there is no event timeout set just wait for 1 second instead of setting poll timeout to 0. Bug: 57697 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
-rw-r--r--src/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sched.c b/src/sched.c
index 39d9d09..3618f11 100644
--- a/src/sched.c
+++ b/src/sched.c
@@ -156,7 +156,7 @@ skip:
i++;
}
- n = poll(pfd, i, timeoutev ? timeout : 0);
+ n = poll(pfd, i, timeoutev ? timeout : 1000);
if (n < 0) {
if (errno != EINTR) {
Panic(errno, "poll");