OSError: [Errno 4] Interrupted system call

 转自:https://github.com/pytorch/pytorch/issues/4220

I have refer to https://stackoverflow.com/questions/14136195/what-is-the-proper-way-to-handle-in-python-ioerror-errno-4-interrupted-syst and change the function recv_handle() in reduction.py as follow

def recv_handle(conn):
    while True:
        try:
            _fl_data = _multiprocessing.recvfd(conn.fileno())
            break
        except OSError, num:
            print num
            if num==4:
                continue
    return _fl_data
`
it work, but I don't know which program trigger this Interrupt.

猜你喜欢

转载自blog.csdn.net/Willen_/article/details/84388733