[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk 5.1.1 testsuite failures
From: |
arnold |
Subject: |
Re: gawk 5.1.1 testsuite failures |
Date: |
Sun, 21 Nov 2021 01:55:17 -0700 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
This is now in git. Much thanks!
Arnold
"Miguel Pineiro Jr." <mpj@pineiro.cc> wrote:
> Hi, Arnold.
>
> A suggestion for eliminating the (recently disabled) race in iolint.awk:
>
> Since the test doesn't use --posix, it can use ENVIRON[] to pass to a
> child a string to eval. This makes it easy to execute different, simple
> commands without modifying the redirection expression.
>
> The `read` in the second pipeline prevents the race.
>
> BEGIN {
> LINT = 1
>
> # `%.*s' used for input pipe and output pipe
> pipecmd = "eval $CMD_TO_RUN"
>
> ENVIRON["CMD_TO_RUN"] = "echo hello"
> pipecmd | getline junk
> ENVIRON["CMD_TO_RUN"] = "read junk"
> print "hello" | pipecmd
>
> print close(pipecmd)
> print close(pipecmd)
> fflush()
> }
>
> Take care,
> Miguel
Re: gawk 5.1.1 testsuite failures, Miguel Pineiro Jr., 2021/11/16