TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: PANCHO
from: MARTIN GREGORIE
date: 2021-01-18 15:15:00
subject: Re: Battery Powered Proje

On Mon, 18 Jan 2021 14:02:33 +0000, Pancho wrote:

>> About -W : according to the manpage for the awk version I'm using,
>> 5.0.1, -W has nothing to do with waiting for anything. All it does is
>> to change the option marker from - to --
>>
>> I'm using Raspbian Buster, default awk is mawk 1.3.3.
>
> Perhaps that explains our different experience. mawk buffering doesn't
> appear to be line buffering by default, i.e it buffers blocks somewhere
> between 2 to 3kB (whatever the correct name for that is).
>
> What OS are you using?

Fedora 32 for these tests, which uses awk 5.0.1  - The Buster awk is very
old, so raising a bug requesting an upgrade to the latest awk may be a
good idea.

Running "man 7 pipe" tells you almost everything you'd want to know about
pipes and that the implementation changed at Linux 2.6.11 - Fedora 32 is
using the Linux 5.9.16 kernel.

Turns out I was wrong about buffering: before 2.6.11 the max buffer size
was 4Kb and now its 64 Kb, which rather points at the Raspbian process
scheduler as the cause of your buffering problem: if the scheduler is
slow to pass control to awk after stuff has been written to the pipe
buffer, that would explain the delays you're seeing. If this is the case,
you'll need to recognise the problem within the program that detects it
and, if its fatal to the system as a whole, make your program issue a
"sudo stop" command - in a script something like this should work:

sudo stop  * Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)                                                                                                                                                                                                                                                   

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.