Re: My script makes a defunct subshell and sticks on read

2018-01-31 Thread Chet Ramey
On 1/31/18 7:44 AM, Øyvind Hvidsten wrote: > Here. Now it's reading from stdin, and it locks up after a few seconds > every time. No fifo's, pipes, non-standard file descriptors or anything. > > bash -c 'for ((i=0; ; i++)); do (( i%100 )) || printf "%s\n" "$i"; read -t > 0.1; done' This is de

Re: My script makes a defunct subshell and sticks on read

2018-01-31 Thread Chet Ramey
On 1/31/18 6:09 AM, Øyvind Hvidsten wrote: > > It will also lock up when run like this, without opening and closing the > file descriptor repeatedly. A missed signal, perhaps? > > exec {fd}<> <(:); for ((i=0; ; i++)); do ((i%100)) || echo $i; read -t > 0.001 -u $fd; done It might be a signal pr

Re: My script makes a defunct subshell and sticks on read

2018-01-31 Thread Øyvind Hvidsten
Here. Now it's reading from stdin, and it locks up after a few seconds every time. No fifo's, pipes, non-standard file descriptors or anything. bash -c 'for ((i=0; ; i++)); do (( i%100 )) || printf "%s\n" "$i"; read -t 0.1; done' I'll shut up now.

Re: My script makes a defunct subshell and sticks on read

2018-01-31 Thread Øyvind Hvidsten
On 30/01/18 22:51, Chet Ramey wrote: On 1/30/18 3:04 PM, Øyvind Hvidsten wrote: Bash Version: 4.4 Patch Level: 12 Release Status: release Description:     Running the included script, which does nothing useful but is cut down a lot to demonstrate the issue, my main computer (amd64 based) coun

Re: My script makes a defunct subshell and sticks on read

2018-01-31 Thread Øyvind Hvidsten
On 30/01/18 22:54, Øyvind Hvidsten wrote: > On 30/01/18 22:51, Chet Ramey wrote: >> On 1/30/18 3:04 PM, Øyvind Hvidsten wrote: >> >>> Bash Version: 4.4 >>> Patch Level: 12 >>> Release Status: release >>> >>> Description: >>> Running the included script, which does nothing useful but is >>> cu

Re: My script makes a defunct subshell and sticks on read

2018-01-30 Thread Øyvind Hvidsten
On 30/01/18 22:51, Chet Ramey wrote: On 1/30/18 3:04 PM, Øyvind Hvidsten wrote: Bash Version: 4.4 Patch Level: 12 Release Status: release Description:     Running the included script, which does nothing useful but is cut down a lot to demonstrate the issue, my main computer (amd64 based) coun

Re: My script makes a defunct subshell and sticks on read

2018-01-30 Thread Chet Ramey
On 1/30/18 3:04 PM, Øyvind Hvidsten wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: >     Running the included script, which does nothing useful but is cut down > a lot to demonstrate the issue, my main computer (amd64 based) counts to > several million, th

My script makes a defunct subshell and sticks on read

2018-01-30 Thread Øyvind Hvidsten
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACK