diff options
author | Amadeusz Sławiński <amade@asmblr.net> | 2020-02-03 23:38:48 +0100 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2020-02-03 23:40:11 +0100 |
commit | c2d797a3792a6e9ee4276600cc00f22e121bc8e2 (patch) | |
tree | 3d20ef8a0ed5321966f1f2b815914481e5acdbd6 | |
parent | e25dd483daf03232bbe5749bb48cf874607e2db3 (diff) | |
download | screen-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.c | 2 |
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"); |