in reply to Re: open for append
in thread open for append

Good point. I'll edit my post to say that the C library guarantees that data shall not be overwritten.

-Colin.

WHITEPAGES.COM | INC

Replies are listed 'Best First'.
Re^3: open for append
by merlyn (Sage) on Aug 25, 2005 at 15:53 UTC
    the C library guarantees that data shall not be overwritten
    But it's not the C library either. It's the kernel. The C library doesn't care, and doesn't know that O_APPEND was used. It simply does the write(2) call, and because the open(1) call had O_APPEND, the kernel arranges for write-at-end in an atomic fashion.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.