Re: [HACKERS] A portable code question

2003-06-26 Thread Andrew Dunstan
Or if you want this behaviour all the time, one call of setvbuf(mypipe,(char *)0,_IONBF,0); should do the trick (much easier than remebering to have to call fflush() all the time). If not using streams, and just calling write(), then you probably don't have to worry. andrew BTW, "system('slee

Re: [HACKERS] A portable code question

2003-06-26 Thread nolan
> Assuming you're using file streams to write to the pipe, fflush() will do > the trick. The problem is that the pipe (from \o |tee ) is intermingling writes to stdout by tee with direct writes to stdout from within psql. I do issue a fflush, because that's necessary to make the pipe do its

Re: [HACKERS] A portable code question

2003-06-26 Thread Benjamin Minshall
Assuming you're using file streams to write to the pipe, fflush() will do the trick. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > [EMAIL PROTECTED] > Sent: Thursday, June 26, 2003 2:20 PM > To: pgsql hackers list > Subject: [HACKERS] A portable cod