Re: A portable code question

From: "Benjamin Minshall" <minshall(at)intellicon(dot)biz>
To: <nolan(at)celery(dot)tssi(dot)com>, "pgsql hackers list" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: A portable code question
Date: 2003-06-26 19:01:12
Message-ID: HCECLGBPPGLHHAFMDHPAAEFGCAAA.minshall@intellicon.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Assuming you're using file streams to write to the pipe, fflush() will do
the trick.

> -----Original Message-----
> From: pgsql-hackers-owner(at)postgresql(dot)org
> [mailto:pgsql-hackers-owner(at)postgresql(dot)org]On Behalf Of
> nolan(at)celery(dot)tssi(dot)com
> Sent: Thursday, June 26, 2003 2:20 PM
> To: pgsql hackers list
> Subject: [HACKERS] A portable code question
>
>
> In the little fix I came up with for psql last night, I need to be able
> to ensure that something sent to a pipe (and then to stdout) completes
> before issuing the prompt directly to stdout.
>
> I did this with: "system ('sleep 1');", but I'm fairly sure that is
> not portable nor does it ENSURE completion.
>
> What's the proper way to do this? And what's a good book on writing
> portable code?
> --
> Mike Nolan
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2003-06-26 19:07:30 Re: ECPG thread success (kind of) on Linux
Previous Message Austin Gonyou 2003-06-26 19:00:58 Re: Two weeks to feature freeze