bug-gawk
[Top][All Lists]
Advanced

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

Re: gawk: sigpipe1.awk:7: fatal: print to "yes | true" failed: Broken pi


From: Manuel Collado
Subject: Re: gawk: sigpipe1.awk:7: fatal: print to "yes | true" failed: Broken pipe
Date: Tue, 2 Jan 2024 15:39:06 +0100
User-agent: Mozilla Thunderbird

El 2/1/24 a las 15:32, Andrew J. Schorr escribió:

This seems odd to me. The code for the first one looks like this:

    res = gettimeofday()
    st = systime()
    printf "gettimeofday - systime = %d\n", res-st

The effect of "%d" should be to round down positive values and round up
negative ones. I'm jet-lagged so probably not thinking clearly, but I'm not
seeing how this can give a result of 1.  The awk gettimeofday() call should
simply map to the gettimeofday() system call, and systime() maps to time().
Do you understand how we're getting a result of 1? What type of system
is this? I'd find -1 more plausible on some insanely sluggish VM.

The cause may be a clock tick occurring between the first two statements.

Just my 2c.



reply via email to

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