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 19:43:59 +0200
User-agent: Heirloom mailx 12.5 6/20/10

Hi. Re this:

> Date: Thu, 6 Dec 2012 10:54:15 -0600
> From: Peng Yu <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] flush in the main process but not coprocess?
>
> Hi,
>
> I have to use fflush() in the coprocess, otherwise the program hangs.
> This is documented as the following.
>
> I/O buffering may be a problem. gawk automatically flushes all output
> down the pipe to the coprocess. However, if the coprocess does not
> flush its output, gawk may hang when doing a getline in order to read
> the coprocess's results. This could lead to a situation known as
> deadlock, where each process is waiting for the other one to do
> something.
>
> 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?

No, there is no work-around for this problem.  Sorry.

Arnold



reply via email to

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