On Aug 20, 2016 9:32 PM, "Dmitry Goncharov" <dgoncha...@users.sf.net> wrote:
> With this new contract how can the user write portable bash code which
tests if a fd refers to a pipe?

The test command seems to have the behavior you expect.

$ uname
SunOS
$ mkfifo /tmp/pipe
$ cat < /tmp/pipe &
[1] 25376
$ exec 6>/tmp/pipe
$ test -p /dev/fd/6 && echo pipe
$ /usr/bin/test -p /dev/fd/6 && echo pipe
pipe

Reply via email to