Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 1999 18:06:47 +0400
From:      "Andrei Iltchenko" <avi@imail.ru>
To:        hackers@freebsd.org
Subject:   POSIX threads question
Message-ID:  <199907280700213@avi.imail.ru>

next in thread | raw e-mail | index | archive | help
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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907280700213>