which is "better" - /dev/fd or FIFO

tech-lists tech-lists at zyxst.net
Mon Mar 8 15:20:07 UTC 2021


On Sun, Mar 07, 2021 at 03:13:14PM -0700, Bob Proulx wrote:
>tech-lists wrote:
>> Thanks for that. It explains partly why it's not enabled by default.
>> But I wondered why it's there at all, what is the benefit of that
>> functionality (if enabled) over what (in this case, bash-commander) it
>> would use in its absence (presumably FIFO)
>
>Twice now you have written /dev/fd or FIFO but I don't see any
>connection between those two things.  

sorry, my error. confusing file descriptors/named pipes. Ignore FIFO.

>Note that the use of /dev/fd is something that a script writer decides
>they want to use or not.  It's a new thing in the grand scheme of
>geological time and I personally both 1) only rarely ever see its use
>in scripts and 2) rather disprove of it because it isn't really a
>portable feature.  I have never felt the need to code using it myself.
>So personally I would recommend not using it..  I always scrape those
>out of scripts whenever I see that people have used them.  YMMV.
>
>Note that bash will internally simulate /dev/fd if a real system one
>is not provided.  Pretty sure anyway.  I have definitely used bash and
>seen that feature noted even on systems without /dev/fd directory support.

Basically, I'm asking why it's available to be enabled, and the reason
I'm asking *that* is because I don't know if or why or in what scenario
it would be "better".

When I'm installing a port, if there are options available, I'll look at
them and see if they're needed for my use case. I generally go for the
minimum number of options to satisfy the use case requirement, because
it usually makes life simpler. In order to do this, I need to have a
grasp on what the options enable and why. In this case, i don't know the
why, which is why I'm asking.

-- 
J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20210308/4c9f2c9d/attachment.sig>


More information about the freebsd-questions mailing list