[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: |
Alex Ryan |
Subject: |
bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process |
Date: |
Fri, 25 Nov 2016 16:39:24 -0800 |
That worked beautifully.
Great explanation.
Much appreciated.
On Fri, Nov 25, 2016 at 4:06 PM, Pádraig Brady <address@hidden> wrote:
> On 25/11/16 23:59, Pádraig Brady wrote:
> > 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
>
> Actually the minimum reproducer is:
>
> $ shuf /dev/null 0>&-
> shuf: read error: Bad file descriptor
>
> That format shows that tac doesn't have the issue
> (and tac is not a single file util anyway):
> but uniq does have the issue:
>
> $ uniq /dev/null 0>&-
> uniq: error reading /dev/null
>
> We might be able to improve this.
> Anyway the workaround presented previously should work.
>
> cheers,
> Pádraig
>
--
Alex Ryan
https://www.linkedin.com/in/alexryan
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Alex Ryan, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Paul Eggert, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Pádraig Brady, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Pádraig Brady, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process,
Alex Ryan <=
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Paul Eggert, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Paul Eggert, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Pádraig Brady, 2016/11/25
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Paul Eggert, 2016/11/26
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Pádraig Brady, 2016/11/26
- bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Paul Eggert, 2016/11/26
bug#25029: shuf generates “Bad file descriptor” error on nfs but only when run as a background process, Eric Blake, 2016/11/28