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

2021-02-10 Thread Koichi Murase
2021年2月11日(木) 7:28 Chet Ramey : > On 2/10/21 6:21 PM, Koichi Murase wrote: > > 2021年2月11日(木) 7:02 Chet Ramey : > >> You'll have to hook the timeout code into the pselect/select calls, as you > >> suspect. Take a shot and it and send me what you come up with. > > > > Thank you for the comment. I'll

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

2021-02-10 Thread Chet Ramey
On 2/10/21 6:21 PM, Koichi Murase wrote: 2021年2月11日(木) 7:02 Chet Ramey : You'll have to hook the timeout code into the pselect/select calls, as you suspect. Take a shot and it and send me what you come up with. Chet Thank you for the comment. I'll try it when I have time this week. Let me k

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

2021-02-10 Thread Koichi Murase
2021年2月11日(木) 7:02 Chet Ramey : > You'll have to hook the timeout code into the pselect/select calls, as you > suspect. Take a shot and it and send me what you come up with. > > Chet Thank you for the comment. I'll try it when I have time this week. Koichi

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

2021-02-10 Thread Chet Ramey
On 2/10/21 11:59 AM, Koichi Murase wrote: I'd also like to know how this is going to work with read -e and readline, since those don't seem to know anything about the timer. OK, that is a good point. I completely forgot about `read -e'. I took a look at `rl_getc (stream)' (lib/readline/input.c

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

2021-02-10 Thread Koichi Murase
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.

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

2021-02-10 Thread Chet Ramey
On 2/10/21 10:21 AM, Chet Ramey wrote: On 2/8/21 9:37 AM, Koichi Murase wrote:    Instead, I believe, it is more natural to use `select(2)', which is    already used to implement `read -t 0'.  In the attached patch    `0001-Use-select-2-for-the-read-timeout.patch', I used `select(2)'    to impl

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

2021-02-10 Thread Chet Ramey
On 2/8/21 9:37 AM, Koichi Murase wrote: Instead, I believe, it is more natural to use `select(2)', which is already used to implement `read -t 0'. In the attached patch `0001-Use-select-2-for-the-read-timeout.patch', I used `select(2)' to implement the timeout of `read(2)'. When `s

Re: extdebug now implies errtrace which implies `trap ... ERR` execution w/out `set -e`

2021-02-10 Thread Chet Ramey
On 2/10/21 2:10 AM, Mike Frysinger wrote: On 09 Feb 2021 16:40, Chet Ramey wrote: On 2/9/21 11:51 AM, Mike Frysinger wrote: we're on bash-4.3 atm. we would upgrade to the latest if that were actually a reliable process. unfortunately, moving between bash versions is often full of random reg