Matthias Huber schrieb:
Joachim Ott schrieb:
See http://1qaz.de/crontab.txt - vim even makes a fsync-call, st_size
and st_mtime are set to new values, but a few lines later when vim and
the calling shell have terminated, the fstat from within crontab says
st_size = 0 and st_mtime unchanged. Could it be that the fstat is
getting the data from the fs-cache instead of the fs itself?
yes, this could be possible.
from the view of a programmer, i wouldn't expect, that my file
descriptor or stat call is changing for an from my program opened file.
did you have a look in the ubuntu-patches ?
sorry, the send know was too fast:
(but that is exactly what i meant with "i wouldn't expect" and paul
vixie with his comment in crontab.c):
the problem is: two different inodes for the file.
st_ino=18295,
st_ino=18282
stat64("crontab.3948", {st_dev=makedev(0, 16), st_ino=18295,
st_mode=S_IFREG|0600, st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=8,
st_size=22, st_atime=2009/10/12-19:34:49, st_mtime=2009/10/12-19:34:49,
st_ctime=2009/10/12-19:34:49}) = 0
3948 --- SIGCHLD (Child exited) @ 0 (0) ---
3948 fstat64(6, {st_dev=makedev(0, 16), st_ino=18282, st_mode=S_IFREG|0600,
st_nlink=0, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=0,
st_atime=2009/10/12-19:34:33, st_mtime=2009/10/12-19:34:27,
st_ctime=2009/10/12-19:34:49}) = 0
3948 write(2, "crontab: no changes made to cron"..., 36) = 36
3948 unlink("/tmp/crontab.3948") = 0
3948 gettimeofday({1255368890, 250874}, NULL) = 0
3948 write(3, "root (10/12-19:34:50-3948) END E"..., 43) = 43
3948 gettimeofday({1255368890, 262979}, NULL) = 0
3948 SYS_289(0x4, 0x17d90, 0x3a, 0x4000, 0x1a28) = 58
3948 exit_group(0) = ?
_______________________________________________
Shr-User mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-user