POSIX threads question

1999-07-28 Thread Andrei Iltchenko
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 - w

POSIX threads question

1999-07-28 Thread Andrei Iltchenko
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 -

Re: POSIX threads question

1999-07-20 Thread Andy Doran
man 3 setvbuf - ad > Hi there, > > I have written a multithreaded application. > In which, I have redirected stdin, stdout and stderr to some files. > > Does anybody know why if I make a call to fprintf family of functions, I get > nothing in the output files, until I call fflush? To Unsubscri

Re: POSIX threads question

1999-07-20 Thread Nick Hibma
Files are block buffered not line buffered. Switch on hot piping (sorry, don't know how to), or wait until you have written 64kb, of flush more often. Nick On Tue, 20 Jul 1999, Andrei Iltchenko wrote: > Hi there, > > I have written a multithreaded application. > In which, I have redirecte

POSIX threads question

1999-07-20 Thread Andrei Iltchenko
Hi there, I have written a multithreaded application. In which, I have redirected stdin, stdout and stderr to some files. Does anybody know why if I make a call to fprintf family of functions, I get nothing in the output files, until I call fflush? Thank you in advance. ---

Re: POSIX threads question

1999-07-20 Thread Andy Doran
man 3 setvbuf - ad > Hi there, > > I have written a multithreaded application. > In which, I have redirected stdin, stdout and stderr to some files. > > Does anybody know why if I make a call to fprintf family of functions, I get nothing >in the output files, until I call fflush? To Unsubscri

Re: POSIX threads question

1999-07-20 Thread Nick Hibma
Files are block buffered not line buffered. Switch on hot piping (sorry, don't know how to), or wait until you have written 64kb, of flush more often. Nick On Tue, 20 Jul 1999, Andrei Iltchenko wrote: > Hi there, > > I have written a multithreaded application. > In which, I have redirect

POSIX threads question

1999-07-20 Thread Andrei Iltchenko
Hi there, I have written a multithreaded application. In which, I have redirected stdin, stdout and stderr to some files. Does anybody know why if I make a call to fprintf family of functions, I get nothing in the output files, until I call fflush? Thank you in advance. --