[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gawk 5.1.1 testsuite failures

From: Miguel Pineiro Jr.
Subject: Re: gawk 5.1.1 testsuite failures
Date: Tue, 16 Nov 2021 02:04:42 -0500
User-agent: Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34

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.

        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)

Take care,

reply via email to

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