Re: strange message before sending mail

Reed Underwood <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
On 8/19/26 10:51, Ian Collier via Mutt-dev wrote:
> On Wed, Aug 19, 2026 at 01:43:57PM +0200, Vincent Lefevre wrote:
>> This is fine. However, I can reproduce the issue many times
>> every second with
> [redacted]
>
> That's bizarre.  So it seems the output of time(2) is delayed by
> at least one jiffy with respect to the real time.  Vide:
>
>
> #include <stdio.h>
> #include <time.h>
> #include <sys/time.h>
>
> int main(void) {
>    struct timeval tv;
>    time_t t;
>    while (1) {
>      gettimeofday(&tv, NULL);
>      t = time(NULL);
>      if (t < tv.tv_sec)
>        printf("%ld < %ld.%06d\n", (long)t, (long)tv.tv_sec, (int)tv.tv_usec);
>    }
> }
>
>
> This produces output on every system I've tested so far, from Centos7
> (3.10.0) upwards.  But the generic 6.8.0 kernel on Ubuntu 24.04 (and
> all earlier systems) does not produce output for the test that touches a
> file.  Whereas Ubuntu 24.04 systems running an OEM kernel (6.17.0) and
> all Fedora systems do produce output from both tests.
>
> This seems to mean that the Linux kernel has changed something about
> how the time is obtained when touching a file; but ultimately it is
> the time(2) call that is to blame.
>
> Ian Collier.
I can confirm the behavior you describe in Ubuntu 24.04 (6.8.0 kernel).

For what it's worth, the behavior is not reproducible in FreeBSD.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.