Message136090
> 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(). |
|
Date |
User |
Action |
Args |
2011-05-16 14:00:08 | pitrou | set | recipients:
+ pitrou, jcea, bquinlan, vstinner, jnoller, hongqn, brian.curtin, asksol, vlasovskikh, neologix, gdb, Albert.Strasheim, aljungberg, gkcn |
2011-05-16 14:00:07 | pitrou | link | issue9205 messages |
2011-05-16 14:00:07 | pitrou | create | |
|