Antoine Pitrou <pit...@free.fr> added the comment: > Thus, > Connection.recv_bytes() will be called: > > def _recv_bytes(self, maxsize=None): > buf = self._recv(4) > size, = struct.unpack("=i", buf.getvalue()) > if maxsize is not None and size > maxsize: > return None > return self._recv(size) > > The first _recv() will succeed, since the length is in the Pipe. > The second one, however, will remain stuck on the read from the > pipe/unix socket, because there's no more data. > This can be reproduced easily by adding a short sleep right after the > sending of the length of the buffer inside send_bytes(), and then > sending a SIGKILL to a worker process.
That's true. We would need to insert a select() before each raw read(). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9205> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com