On Tue, 27 Jul 2021 10:07:35 -0300, Phillip Bushee wrote:

> OpenBSD awk(1) should fail when passing a directory as argument.
> However, it runs continuously.  Try the following:
>
>       mkdir dir
>       awk 1 dir
>
> It seems to enter an infinite loop.
>
> This is not a problem of onetrueawk. I tried its latest version
> and this problem does not occur.

I can reproduce that with the awk in 6.9 but not -current.
It looks like this got fixed by:

revision 1.46
date: 2021/06/10 21:01:43;  author: millert;  state: Exp;  lines: +3 -2;  commit
id: 2RyjiLDqaFMPuTVG;
Fix readrec's definition of a record
It is not sufficient to check for the EOF flag on a stream.
>From https://github.com/onetrueawk/awk/pull/117

 - todd

 - todd



 - todd

Reply via email to