-
select() will always return immediately for a FIFO because reads will never block. As a result, this loop was busy-waiting. There is no easy way to portably read past EOF on a FIFO on stdin without busy-waiting. The usual trick to avoid EOF on a FIFO is to open the FIFO for both reading and writing. As long as at least one writer is open, no EOF will occur. Unfortunately, we cannot use this trick here because we cannot open stdin for writing. Fixes #5153. (cherry picked from commit 4a491b97563f0bc8f057da307cb01f477974279c) Original: 7bdc32153eedfa210332dd99f3f129372f16e807
fd7efc74