Skip to content

Commit 813d74f

Browse files
committed
Make pager EINTR safe.
1 parent 93a3db5 commit 813d74f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bpython/pager.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,12 @@ def page(data, use_internal=False):
5959
return
6060
if e.errno != errno.EPIPE:
6161
raise
62-
popen.wait()
62+
while True:
63+
try:
64+
popen.wait()
65+
except OSError, e:
66+
if e.errno != errno.EINTR:
67+
raise
68+
else:
69+
break
6370
curses.doupdate()

0 commit comments

Comments
 (0)