Re: [PATCH v12 04/20] index-helper: new daemon for caching index and related stuff
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 26, 2016, 04:27 UTC
- Message-ID
- <CACsJy8Dqvv-Ty-wG0qkenyvLNLyqVueJmhjiQXnr0zVUGFvDeA@mail.gmail.com>
- In-Reply-To
- <576ED9A2.8070202@novalis.org>
On Sat, Jun 25, 2016 at 9:21 PM, David Turner <novalis@novalis.org> wrote:
Show 19 quoted lines
> On 06/25/2016 10:33 AM, Duy Nguyen wrote: >>> >>> + /* >>> + * Our connection to the client is blocking since a >>> client >>> + * can always be killed by SIGINT or similar. >>> + */ >>> + set_socket_blocking_flag(client_fd, 0); >> >> >> Out of curiosity, do we really need this? I thought default behavior >> was always blocking (and checked linux kernel, it seemed to agree with >> me). Maybe for extra safety because other OSes may default to >> something else? > > > Yes -- see this bug report for details: > https://bugs.python.org/issue7995 >
I think we should refer to this issue in the comment block right before set_socket_blocking_flag() call. Imagine a year from now, I may read the code, decide this code is useless and try to remove it.
-- Duy