:
:
:Matthew Dillon <dil...@apollo.backplane.com> writes:
:
:>     UNIX has been broken this way from day 1.  It was a major design mistake.
:>     The only way to get your own descriptor seek offset is to open() the
:>     file again.
:
:It's not necessarily breakage.  Not having any mechanism other than
:open to get your own seek offset is nasty, but sharing a seek offset
:can also be useful.  File descriptors can't be "reverse-inherited", so
:in order to continue writing to the same redirected output file, a
:sequence of commands executed by a shell needs to be able to share the
:actual file offset.  I believe this was the original reason for the
:behavior.

    If it's a redirected output file you simply make it O_APPEND, at which
    point the seek offset in the descriptor becomes irrelevant.

                                        -Matt
                                        Matthew Dillon 
                                        <dil...@backplane.com>


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-current" in the body of the message

Reply via email to