On 8/21/16 10:36 PM, Dmitry Goncharov wrote:
>> But why should bash override the semantics that an OS provides for
>> /dev/fd, resulting in differing behavior between the shell and other
>> utilities with the same pathname argument?
>
> For the benefit of the user. Currently bash behavior is different from the
> native test and ksh on sunos.
At least on Solaris, /bin/test is not really a standalone binary, but
part of ksh93. Even though the man page references GNU test, it's
obvious from running `strings' or `nm' on the binary that it's part of
ksh93.
> What about a patch that switches to fstat only if such /dev/fd oddity was
> determined at configuration time?
I'd rather it were done via an explicit switch to configure. I'd look at
a patch to do that.
Chet
--
``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/