Kern Sibbald wrote: > What surprises me is that I always believed that write() operations were > atomic. However, in this case, two thread are writing to the same socket at > the same time, and the data of the two write()s is intermixed -- a bit ugly. >
I don't know if this is really relevant or not to this particular case, but this man page claims that at least for pipes and FIFOs, writes are only atomic up to writing PIPE_BUF bytes: http://linux.die.net/man/3/write I don't pretend to be much of a C programmer, but it sounds plausible to me =) -- Frank Sweetser fs at wpi.edu | For every problem, there is a solution that WPI Senior Network Engineer | is simple, elegant, and wrong. - HL Mencken GPG fingerprint = 6174 1257 129E 0D21 D8D4 E8A3 8E39 29E3 E2E8 8CEC ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bacula-devel mailing list Bacula-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-devel