I'm writing a node.js server that uses the cluster module. Each worker does *lots* of logging to a shared log file (it must be just 1 file).
- Assuming log lines are smaller than PIPE_BUF (4k), is it safe to do fs.write() and rely on it being atomic, or does Node.js break this promise of write()? - What's with "Note that it is unsafe to use fs.write multiple times on the same file without waiting for the callback."? - If writes are not atomic or not waiting for callbacks really is a problem, what's an *efficient* alternative? Thanks, Jaka -- Job Board: http://jobs.nodejs.org/ Posting guidelines: 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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
