[core/input] Handle epoll interrupts
Sometimes epoll poll() calls get interrupted by the system - handle that more gracefully.
This commit is contained in:
parent
c041e33bc0
commit
7af57c7fc4
1 changed files with 4 additions and 1 deletions
|
@ -28,7 +28,10 @@ def read_input(inp):
|
||||||
if is_terminated():
|
if is_terminated():
|
||||||
return
|
return
|
||||||
|
|
||||||
events = epoll.poll(1)
|
try:
|
||||||
|
events = epoll.poll(1)
|
||||||
|
except Exception:
|
||||||
|
continue
|
||||||
for fileno, event in events:
|
for fileno, event in events:
|
||||||
line = "["
|
line = "["
|
||||||
while "[" in line:
|
while "[" in line:
|
||||||
|
|
Loading…
Reference in a new issue