Current-Users archive

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

Re: Identifying the NetBSD shell



    Date:        Tue, 22 Mar 2016 04:08:50 +0100
    From:        Kamil Rytarowski <n54%gmx.com@localhost>
    Message-ID:  <56F0B742.70807%gmx.com@localhost>

  | Redirecting fd >= 10 is rather a specialized use-case. Is it possible
  | to detect it dynamically?

What we have now is just a bug.   It will get fixed.

The standard sets no upper limit on fd - it says that values up to 9
should be supported (and at that the NetBSD shell does OK, assuming a few
caveats that do not usually apply) but allows for anything larger the
implementation can support.   Good shells allow the user to use anything
that would be valid in a dup2() call (as the target).   That's what we
should aim for.   I believe earlier versions of the NetBSD shell used to
regard values > 9 as a syntax error.  That (while sub-optimal) was OK.
The current shell just makes a mess of itself...

kre



Home | Main Index | Thread Index | Old Index