On Wed, Oct 22, 2014 at 3:24 AM, Mark Volkmann <[email protected]> wrote: > The docs say ... > " 'ax' - Like 'a' but fails if path exists." > and a bit later ... > "The exclusive flag 'x' ensures that path is newly created." > > What is the point is using the 'ax' mode if it can't append to an existing > file? > It seems that the 'wx' mode would do the same thing. > > -- > R. Mark Volkmann > Object Computing, Inc.
Mode 'ax' (which is a shorthand for `O_APPEND | O_CREAT | O_EXCL | O_WRONLY`, see `man 2 open`) is useful when there will be multiple concurrent writers, like, say, different processes that write to a single log file. Without the append flag, the processes would overwrite each other's output. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAHQurc8zhRSxsQ9uL_SAmQjci2p0BJPFPiO0j8BRaWnX4aT3Tw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
