Gisle Vanem wrote:
> Might-Commander on Windows (MCWin32) supports this as
> well as "/dev/stdin", "/dev/stdout" and "/dev/stderr".
> An idea for Gnulib?

It's an interesting idea.

On one hand:

  - Most OSes support /dev/stdin, /dev/stdout, /dev/stderr, and /dev/fd/N:
    Linux, Hurd, macOS, FreeBSD, NetBSD, OpenBSD, Solaris, Cygwin, Android.
    Only AIX and native Windows don't support it.

On the other hand:

  - It's not standardized by POSIX [1].

  - The number of uses of /dev/stdin, /dev/stdout, /dev/stderr is 100 times
    smaller than that of /dev/null [2].

  - It seems the major use of these shorthands is in shell scripts.
    It's probably not a useful feature for GNU coreutils, GNU gettext, and
    most other packages. Only language runtimes like GNU guile or GNU clisp
    would probably profit from it.

  - Support for these shorthands is extra code in the 'stat', 'fstatat', 'open',
    and 'openat' overrides. But the 'openat' code in Gnulib is so complex
    that I would not like to add complexity to it.

Bruno

[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap02.html
[2] https://codesearch.debian.net/search?q=%2Fdev%2Fnull&literal=1




Reply via email to