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 problem. I'll take a look. > Note I also turned the pipe around so it's opened for read only instead of > write :) It still seems problematic that Linux allows the /dev/fd file to be opened read-write when the underlying file descriptor is read-only. A different (BSD) implementation rejects the open altogether. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/