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.00001; done'
This is definitely a signal issue. No matter how you check, if a signal
arrives between the check and the read, and all the signal handler is
allowed to do is to set a flag, the read will block.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/