Hi,
--- Ursprüngliche Nachricht --- Von: Anders Johansson
An: suse-programming-e@suse.com Betreff: Re: [suse-programming-e] The meaning of atomic in write() Datum: Wed, 29 Mar 2006 18:28:23 +0200 No, that's not what I said. Atomic means "uninterrupted". It means each call to write() will be allowed to complete before another call gets access to it.
However, what I missed in my hazy thinking was that the file descriptor is copied, not shared, so each process has its own idea of where to write in the file. file locking or record locking won't help in this case, you need some other way of letting the processes cooperate, so they know where in the file to write
I think you're right, that "atomic" does not cover the location
to start writing. If I changed my program a little bit:
#include