def accept_no_intr(sock):
    while True:
        try:
            return sock.accept()
        except socket.error as err:
            if err.args[0] != EINTR:
                raise
        except KeyboardInterrupt:
            pass
Call sock.accept such that if it is interrupted by an EINTR
dataset/ETHPy150Open enthought/envisage/envisage/plugins/remote_editor/communication/util.py/accept_no_intr