bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25029: shuf generates “Bad file descriptor” error on nfs but only wh


From: Pádraig Brady
Subject: bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process
Date: Fri, 25 Nov 2016 23:59:13 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 25/11/16 22:24, Alex Ryan wrote:
> I am not certain about this but I *think* this might be a bug in shuf.
> 
> full description of how to reproduce is here
> http://stackoverflow.com/questions/40730239/shuf-generates-bad-file-descriptor-error-on-nfs-but-only-when-run-as-a-backgro

The minimum reproducer is:

  $ shuf 0>&-
  shuf: read error: Bad file descriptor

The reason is that the specified file is reopened to stdin,
which is a general technique used by single file filters.
I.E. this isn't specific to shuf:

  $ tac 0>&-
  tac: standard input: read error: Bad file descriptor

You can avoid the issue by redirecting stdin from the file like:

  $ shuf < your_file

cheers,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]