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: Andrew J. Schorr
Subject: Re: gawk: sigpipe1.awk:7: fatal: print to "yes | true" failed: Broken pipe
Date: Tue, 2 Jan 2024 12:49:33 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

On Tue, Jan 02, 2024 at 03:46:05PM +0100, Andreas Schwab wrote:
> On Jan 02 2024, Andrew J. Schorr wrote:
> 
> > The awk gettimeofday() call should simply map to the gettimeofday()
> > system call, and systime() maps to time().
> 
> The gettimeofday and time functions use different time sources with
> differing precision, so they may move to the next second at slightly
> different points.

Is this on Linux? I'm no expert on this, but in the kernel source
lib/vdso/gettimeofday.c, I see this:

__cvdso_gettimeofday_data:
                if (do_hres(&vd[CS_HRES_COARSE], CLOCK_REALTIME, &ts))
                        return gettimeofday_fallback(tv, tz);

                tv->tv_sec = ts.tv_sec;
                tv->tv_usec = (u32)ts.tv_nsec / NSEC_PER_USEC;

__cvdso_time_data:
        t = READ_ONCE(vd[CS_HRES_COARSE].basetime[CLOCK_REALTIME].sec);

This looks to me as if it's the same source. But maybe I'm looking in the
wrong place or misunderstanding.

Regards,
Andy



reply via email to

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