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.

作者 pitrou
收信人 Albert.Strasheim, aljungberg, asksol, bquinlan, brian.curtin, gdb, gkcn, hongqn, jcea, jnoller, neologix, pitrou, vlasovskikh, vstinner
日期 2011-05-16.14:00:07
SpamBayes Score 3.8817484e-06
Marked as misclassified
Message-id <1305554405.3623.21.camel@localhost.localdomain>
In-reply-to <BANLkTi=sw1pdk_r5haUYbtiGZGfto68SMw@mail.gmail.com>
内容
> 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().
历史
日期 用户 动作 参数
2011-05-16 14:00:08pitrou修改recipients: + pitrou, jcea, bquinlan, vstinner, jnoller, hongqn, brian.curtin, asksol, vlasovskikh, neologix, gdb, Albert.Strasheim, aljungberg, gkcn
2011-05-16 14:00:07pitrou链接issue9205 messages
2011-05-16 14:00:07pitrou创建