-----BEGIN PGP SIGNED MESSAGE-----
| After inspection of the log file, each process logged 20 times, all
| messages interleaved of course. It looks like it works, but am I
| delusional? I’m on an OpenBSD box. Does the OS handle caching/writing
| from multiple sources?
Yes, the OS should manage that (it is file-system level, rather than
userspace level). However, you can tweak your code to have
‘transactional’ logs (i.e. that every application logs a meaningful
chunk of information in one go).
Anyway, the file system and drivers take care of the actual writing.
Though, having everything log into one logfile may result in fractured
files, or odd race conditions and/or deadlocks. It might be saner to log
each process to its own file.
~ - The Elements of Programming Style (Kernighan & Plaugher)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----