On 8/9/16 9:12 PM, Dmitry Goncharov wrote:
> Good morning,
>
> The following piece of shell code does not work on sunos.
> mkfifo /tmp/pipe
> cat < /tmp/pipe &
> exec 6>/tmp/pipe
> test -p /dev/fd/6 && echo pipe
>
> The reason is on sunos /dev/fd/6 is a special character file, not a pipe
> (unlike bsd), not a symlink (unlike linux, cygwin).
> sh_stat ends up calling stat("/dev/fd/6", finfo) and obtains stat of /dev/fd/6
> file rather than stat of the file pointed to by fd 6.
So what you're saying is that you don't like how SunOS implements /dev/fd
and you'd like bash to override the native implementation semantics. Bash
is going to preserve the OS behavior of /dev/fd wherever possible, so I'm
not going to apply this patch without a much more compelling reason.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/