Re: [PATCH] Fix blocking read timeouts at a small probability

2021-02-11 Thread Chet Ramey

On 2/10/21 11:59 AM, Koichi Murase wrote:

2021年2月10日(水) 23:40 Chet Ramey :

On 2/10/21 10:21 AM, Chet Ramey wrote:

Thanks for the analysis and patch. I'll take a look. At first glance, I
would like to find a simpler way to do it.


Thank you. Yes, if there is a simpler but still robust and reliable
way to do it, that would be nice. 


There is, in fact, a simpler way for this case. Blocking SIGCHLD around the
calls to zread and its siblings fixes the problem. It might not be enough
of a general solution for you, though.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: [PATCH] Fix blocking read timeouts at a small probability

2021-02-11 Thread Koichi Murase
2021年2月12日(金) 4:27 Chet Ramey :
> > Thank you. Yes, if there is a simpler but still robust and reliable
> > way to do it, that would be nice.
>
> There is, in fact, a simpler way for this case. Blocking SIGCHLD around the
> calls to zread and its siblings fixes the problem. It might not be enough
> of a general solution for you, though.

Thank you for the fix. Now I see why this particular form (CMD & read
-t) < XXX caused a significantly large timeout-failure rate. But, I
guess the failure rate is almost zero but not exactly zero even after
this fix. As I have already written, as far as the probability is
non-zero, I'm afraid of a situation that another unexpected usage
might cause another relatively large failure rate... Besides, I'm
actually afraid of problems with very small probability more than the
ones with a large probability because they are hard to debug.

--
Koichi