df: fix hang with fifo argument
commitb04ce61958c1f1fc264950f8d3b6058f640ee491
authorPádraig Brady <P@draigBrady.com>
Sun, 29 Oct 2017 22:29:05 +0000 (29 15:29 -0700)
committerPádraig Brady <P@draigBrady.com>
Mon, 30 Oct 2017 16:47:43 +0000 (30 09:47 -0700)
treea67544dd9fb73f9b8bb3cc7d10448aae188e6cb7
parentf89c20bdf7ccc033cbc22662e932fae7761754fc
df: fix hang with fifo argument

* src/df.c (main): stat() before open(), and avoid
the optional open when given a fifo argument.
* tests/df/unreadable.sh: Add a test case.
* NEWS: Mention the fix.
Fixes https://bugs.gnu.org/29038
NEWS
src/df.c
tests/df/unreadable.sh