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.
The patch in the attachment makes sh_stat always use fstat regardless of
HAVE_DEV_FD.
I've tested this patch on linux, sunos and aix.
regards, Dmitry