GNU bug report logs -
#13149
24.3.50; Emacs thinks file was changed outside Emacs, but it was not
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Tue, 11 Dec 2012 21:53:02 UTC
Severity: normal
Tags: moreinfo, unreproducible
Found in version 24.3.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #88 received at 13149 <at> debbugs.gnu.org (full text, mbox):
On 01/17/2013 08:36 PM, Dmitry Gutov wrote:
> The time stamps were identical in all combinations:
Did vboxsf and/or cifs report time stamps that
were not on 100-ns boundaries? That would be a bug.
How about the following program? What does it output?
#include <fcntl.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <time.h>
static int
report_times (int fd, char const *file)
{
struct stat fst, lst, st;
if (fstat (fd, &fst) != 0)
return perror ("fstat"), -1;
if (lstat (file, &lst) != 0)
return perror ("lstat"), -1;
if (stat (file, &st) != 0)
return perror ("stat"), -1;
printf ("%ld.%09ld fstat\n", (long) fst.st_mtim.tv_sec, fst.st_mtim.tv_nsec);
printf ("%ld.%09ld lstat\n", (long) lst.st_mtim.tv_sec, lst.st_mtim.tv_nsec);
printf ("%ld.%09ld stat\n", (long) st.st_mtim.tv_sec, st.st_mtim.tv_nsec);
printf ("\n");
return 0;
}
int
main (void)
{
static char const file[] = "foo";
struct timespec interval;
int fd;
unlink (file);
fd = open (file, O_CREAT | O_WRONLY, -1);
if (fd < 0)
return perror ("open"), 1;
if (report_times (fd, file) != 0)
return 1;
interval.tv_sec = 0;
interval.tv_nsec = 10000000;
if (nanosleep (&interval, 0) != 0)
return perror ("nanosleep"), 1;
if (write (fd, file, sizeof file - 1) != sizeof file - 1)
return perror ("write"), 1;
if (report_times (fd, file) != 0)
return 1;
return 0;
}
This bug report was last modified 11 years and 102 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.