On 2026-08-19 13:21:18 +0200, Vincent Lefevre wrote:
> Well, I'm assuming that in case of $edit_headers set, Mutt does
> the call to time(NULL) *after* the creation of the new file, but
> I haven't checked that. If this is not the case, this would be
> an obvious explanation of the issue.
This is fine. However, I can reproduce the issue many times
every second with
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/stat.h>
const char fname[] = "timetest.txt";
int main(void)
{
struct stat st;
while (1)
{
FILE *f;
time_t t;
f = fopen(fname, "w");
if (f == NULL)
exit(1);
fclose(f);
t = time(NULL);
if (stat(fname, &st) != 0)
exit(1);
if (t < st.st_mtime)
printf("%ld %ld\n", (long) t, (long) st.st_mtime);
}
}
--
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)