This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Albert.Strasheim, aljungberg, asksol, bquinlan, brian.curtin, gdb, gkcn, hongqn, jcea, jnoller, neologix, pitrou, vlasovskikh, vstinner
Date 2011-05-16.14:00:07
SpamBayes Score 3.8817484e-06
Marked as misclassified No
Message-id <1305554405.3623.21.camel@localhost.localdomain>
In-reply-to <BANLkTi=sw1pdk_r5haUYbtiGZGfto68SMw@mail.gmail.com>
Content
> 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().
History
Date User Action Args
2011-05-16 14:00:08pitrousetrecipients: + pitrou, jcea, bquinlan, vstinner, jnoller, hongqn, brian.curtin, asksol, vlasovskikh, neologix, gdb, Albert.Strasheim, aljungberg, gkcn
2011-05-16 14:00:07pitroulinkissue9205 messages
2011-05-16 14:00:07pitroucreate