[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk -i inplace is an order of magnitude faster when also redirectin
From: |
Andrew J. Schorr |
Subject: |
Re: gawk -i inplace is an order of magnitude faster when also redirecting stdout |
Date: |
Sun, 3 Mar 2024 14:30:29 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Feb 29, 2024 at 10:01:30AM -0700, arnold@skeeve.com wrote:
> Adding a setvbuf() call didn't work.
>
> Using freopen() instead of playing games with the file descriptor
> might work, but it's also a hassle.
>
> Andy - can you look at this? Try: in inplace_begin
> - dup stdout to a new fd and save it as now
> - do freopen on stdout to the file. this should set block buffering
>
> In inplace_end, do freopen of /dev/fd/NNN where NNN is the duped
> fd from the original stdout.
Hi, sorry, I was planning to give this a try. I guess you're saying
it didn't work.
Regards,
Andy