Subj : Re: Is std::cerr thread safe To : comp.programming.threads From : nin234 Date : Wed Jul 20 2005 01:01 pm The earlier code was actually using fprintf to stderr. I am sorry for the mistake. TYes it is an interleaved output. The program was working fine when using fprintf. This interleaving is caused by std::cerr call. What do you mean by that there is no guarantee of atomicity of i/o. fprintf manpages at least on solaris tell explicitly that it is MT-Safe with exceptions. So I am assuming that fprintf uses some sort of locking internally to accomplish this. To rephrase my orginal question. Why doesn't std::cerr do the same? .