Handle EINTR in reap_zombies

This commit is contained in:
Kovid Goyal 2017-10-22 19:29:13 +05:30
parent 2b9198866a
commit 0df0fd6a0b
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -3,6 +3,7 @@
# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net> # License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>
import argparse import argparse
import errno
import locale import locale
import os import os
import signal import signal
@ -250,6 +251,9 @@ def reap_zombies(*a):
pid, status = os.waitpid(-1, os.WNOHANG) pid, status = os.waitpid(-1, os.WNOHANG)
if pid == 0: if pid == 0:
break break
except OSError as err:
if err.errno != errno.EINTR:
break
except Exception: except Exception:
break break