bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] flush in the main process but not coprocess?


From: Aharon Robbins
Subject: Re: [bug-gawk] flush in the main process but not coprocess?
Date: Sun, 09 Dec 2012 22:32:49 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

> Date: Sun, 9 Dec 2012 14:15:38 -0500
> From: "Andrew J. Schorr" <address@hidden>
> To: Peng Yu <address@hidden>
> Cc: address@hidden
> Subject: Re: [bug-gawk] flush in the main process but not coprocess?
>
> On Thu, Dec 06, 2012 at 10:54:15AM -0600, Peng Yu wrote:
> > But when the coprocess was written by somebody else, and I don't have
> > control of, it is not an option to call flush. Is there a walk-around
> > to this problem?
>
> I haven't tried this myself, but this thread gives two good suggestions:
>    http://unix.stackexchange.com/questions/25372/turn-off-buffering-in-pipe
> Try using "stdbuf" or "unbuffer" to run the coprocess (see the man pages
> for those commands).
>
> Regards,
> Andy

Actually, since Andy brings up the idea of PTYs, there is the use of
PROCINFO[command, "pty"] to make gawk use PTYs for the two-way
communication. This is documented in the manual.  That may solve
the problem.

HTH,

Arnold



reply via email to

[Prev in Thread] Current Thread [Next in Thread]