HI everybody.

I'm having a problem writing a multi-threaded application.

As I understand from the mans, calls to read and write are synchronized through 
file-locks. Having looked through the source for libc_r I noticed that calls to 
printf and fprintf are also synchronized.

The question is - why I am still having a problem calling fprintf(stderr, ... 
from multiple threads, the output is simply not written until I make a socond 
or a third call to fprintf.
 
I have disabled buffering for stderr with setvbuf.

Thank you in advance.



-------------------------------------------
Sent by InfoArt iMail
http://www.infoart.ru; http://www.stars.ru


To Unsubscribe: send mail to majord...@freebsd.org
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to