public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.5.21: file timestamp not updated after editing
@ 2006-07-30 10:35 Alex Eng
  2006-07-30 14:47 ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Eng @ 2006-07-30 10:35 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

After editing a file, the timestamp on the file (according to ls -l)
is unchanged.  However if stat <filename> is executed, the change
timestamp given in the output differs from that given in ls -l:

$ ls -l foo.c
-rw-r--r-- 1 Alex 126 Jul 29 17:10 foo.c
$ nano foo.c
### File is edited and saved ###
$ ls -l foo.c
-rw-r--r-- 1 Alex 289 Jul 29 17:10 foo.c
$ stat foo.c
  File: `foo.c'
  Size: 289             Blocks: 1          IO Block: 1024   regular file
Device: a8dc98beh/2833029310d   Inode: 562949953426654  Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1004/    Alex)   Gid: (  513/    None)
Access: 2006-07-29 18:19:09.921875000 -0700
Modify: 2006-07-29 17:10:44.531250000 -0700
Change: 2006-07-29 18:19:15.828125000 -0700

This issue doesn't appear to be isolated to ls -l: it is also causing
problems when running make or cvs commit on other files, as make and
cvs thinks that the files hasn't been modified.  (I've resorted to
running touch on the files as a workaround.)

A search on Google on "cygwin file timestamp" failed to find anything
related. I had deleted my entire Cygwin installation (it is installed
on a separate partition), reformatted the partition (NTFS) and
reinstalled, but the problem is still occurring.  Any ideas on further
diagnosing and solving this problem is appreciated.

I am running Cygwin on Windows XP Home Edition, SP2.  Output of
cygcheck -s -v -r > cygcheck.out is attached.

Thanks.

[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 13993 bytes --]


Cygwin Configuration Diagnostics
Current System Time: Sat Jul 29 17:53:12 2006

Windows XP Home Edition Ver 5.1 Build 2600 Service Pack 2

Path:	E:\cygwin\usr\local\bin
	E:\cygwin\bin
	E:\cygwin\bin
	E:\cygwin\usr\X11R6\bin
	c:\Perl\bin\
	c:\WINDOWS\system32
	c:\WINDOWS
	c:\WINDOWS\System32\Wbem
	c:\Program Files\Microsoft SQL Server\90\Tools\binn\
	c:\Program Files\Common Files\Adobe\AGL
	E:\cygwin\dev\e\mozdev\gecko-sdk\bin
	E:\cygwin\dev\e\mozdev\buildtools\windows\bin\x86
	E:\cygwin\dev\e\apache-xml\Xalan-C_1_10_0-win32-msvc_60\bin
	E:\cygwin\dev\e\apache-xml\xerces-c-windows_2000-msvc_60\bin

Output from E:\cygwin\bin\id.exe (nontsec)
UID: 1004(Alex)     GID: 513(None)
0(root)             513(None)           544(Administrators) 545(Users)

Output from E:\cygwin\bin\id.exe (ntsec)
UID: 1004(Alex)     GID: 513(None)
0(root)             513(None)           544(Administrators) 545(Users)

SysDir: C:\WINDOWS\system32
WinDir: C:\WINDOWS

USER = 'Alex'
PWD = '/home/Alex'
CYGWIN = 'tty'
HOME = '/home/Alex'
MAKE_MODE = 'unix'

HOMEPATH = '\Documents and Settings\Alex'
MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man'
APPDATA = 'C:\Documents and Settings\Alex\Application Data'
HOSTNAME = 'ziggy'
TERM = 'cygwin'
PROCESSOR_IDENTIFIER = 'x86 Family 15 Model 43 Stepping 1, AuthenticAMD'
WINDIR = 'C:\WINDOWS'
VS80COMNTOOLS = 'C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\'
CVSROOT = ':pserver:ateng@mozdev.org:/cvs'
OLDPWD = '/cygdrive/c/cygwin/bin'
USERDOMAIN = 'ZIGGY'
OS = 'Windows_NT'
ALLUSERSPROFILE = 'C:\Documents and Settings\All Users'
TEMP = '/cygdrive/c/DOCUME~1/Alex/LOCALS~1/Temp'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
APACHE_XML = '/dev/e/apache-xml'
TVDUMPFLAGS = '8'
USERNAME = 'Alex'
PROCESSOR_LEVEL = '15'
MOZDEV = '/dev/e/mozdev'
XPIDL_INC = 'e:/mozdev/gecko-sdk/idl'
FP_NO_HOST_CHECK = 'NO'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Documents and Settings\Alex'
CLIENTNAME = 'Console'
PS1 = '$ '
LOGONSERVER = '\\ZIGGY'
PROCESSOR_ARCHITECTURE = 'x86'
!C: = 'C:\cygwin\bin'
PERLDOC_PAGER = 'less -E -M'
SHLVL = '1'
PATHEXT = '.com;.exe;.pif;.bat'
HOMEDRIVE = 'C:'
PROMPT = '$P$G'
COMSPEC = 'C:\WINDOWS\system32\cmd.exe'
TMP = '/cygdrive/c/DOCUME~1/Alex/LOCALS~1/Temp'
SYSTEMROOT = 'C:\WINDOWS'
PRINTER = 'hp deskjet 3420 series'
CVS_RSH = 'ssh'
PROCESSOR_REVISION = '2b01'
CVSEDITOR = 'nano'
INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:'
PROGRAMFILES = 'C:\Program Files'
NUMBER_OF_PROCESSORS = '2'
SESSIONNAME = 'Console'
COMPUTERNAME = 'ZIGGY'
_ = '/usr/bin/cygcheck'
POSIXLY_CORRECT = '1'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
  (default) = '/cygdrive'
  cygdrive flags = 0x00000022
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = 'E:\cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = 'E:\cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = 'E:\cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

c:  hd  NTFS     98303Mb  17% CP CS UN PA FC     Windows XP
d:  cd             N/A    N/A                    
e:  hd  NTFS      4094Mb   3% CP CS UN PA FC     Cygwin
h:  hd  NTFS    139266Mb   2% CP CS UN PA FC     Users

E:\cygwin      /          system  binmode
E:\cygwin/bin  /usr/bin   system  binmode
E:\cygwin/lib  /usr/lib   system  binmode
.              /cygdrive  system  binmode,cygdrive

Found: E:\cygwin\bin\awk.exe
Found: E:\cygwin\bin\bash.exe
Found: E:\cygwin\bin\cat.exe
Found: E:\cygwin\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: E:\cygwin\bin\find.exe
Not Found: gcc
Not Found: gdb
Found: E:\cygwin\bin\grep.exe
Found: E:\cygwin\bin\kill.exe
Not Found: ld
Found: E:\cygwin\bin\ls.exe
Found: E:\cygwin\bin\make.exe
Found: E:\cygwin\bin\mv.exe
Not Found: patch
Found: c:\Perl\bin\perl.exe
Found: E:\cygwin\bin\rm.exe
Found: E:\cygwin\bin\sed.exe
Found: E:\cygwin\bin\ssh.exe
Found: E:\cygwin\bin\sh.exe
Found: E:\cygwin\bin\tar.exe
Found: E:\cygwin\bin\test.exe
Not Found: vi
Not Found: vim

   56k 2005/07/09 E:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz2-1.dll" v0.0 ts=2005/7/8 22:09
    7k 2005/11/20 E:\cygwin\bin\cygcharset-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygcharset-1.dll" v0.0 ts=2005/11/19 18:24
    7k 2003/10/19 E:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypt-0.dll" v0.0 ts=2003/10/19 0:57
 1108k 2006/06/01 E:\cygwin\bin\cygcrypto-0.9.7.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-0.9.7.dll" v0.0 ts=2006/6/1 8:50
 1050k 2006/06/01 E:\cygwin\bin\cygcrypto-0.9.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygcrypto-0.9.8.dll" v0.0 ts=2006/6/1 9:08
   40k 2006/03/24 E:\cygwin\bin\cygform-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygform-8.dll" v0.0 ts=2006/3/23 23:16
   45k 2001/04/25 E:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/4/24 22:28
   35k 2002/01/09 E:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                  "cygform6.dll" v0.0 ts=2002/1/8 22:03
   48k 2003/08/09 E:\cygwin\bin\cygform7.dll - os=4.0 img=1.0 sys=4.0
                  "cygform7.dll" v0.0 ts=2003/8/9 2:25
   28k 2003/07/20 E:\cygwin\bin\cyggdbm-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-3.dll" v0.0 ts=2003/7/20 0:58
   30k 2003/08/11 E:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm-4.dll" v0.0 ts=2003/8/10 19:12
   19k 2003/03/22 E:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2002/2/19 19:05
   15k 2003/07/20 E:\cygwin\bin\cyggdbm_compat-3.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-3.dll" v0.0 ts=2003/7/20 1:00
   15k 2003/08/11 E:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm_compat-4.dll" v0.0 ts=2003/8/10 19:13
   17k 2001/06/28 E:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 20:34
   29k 2003/08/10 E:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory5.dll" v0.0 ts=2003/8/10 16:16
   24k 2006/03/25 E:\cygwin\bin\cyghistory6.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory6.dll" v0.0 ts=2006/3/25 6:05
  947k 2005/11/20 E:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygiconv-2.dll" v0.0 ts=2005/11/19 18:24
   22k 2001/12/13 E:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-1.dll" v0.0 ts=2001/12/13 1:28
   37k 2003/08/10 E:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-2.dll" v0.0 ts=2003/8/10 14:50
   31k 2005/11/20 E:\cygwin\bin\cygintl-3.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl-3.dll" v0.0 ts=2005/11/19 18:04
   21k 2001/06/20 E:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2001/6/20 10:09
   21k 2006/03/24 E:\cygwin\bin\cygmenu-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu-8.dll" v0.0 ts=2006/3/23 23:16
   26k 2001/04/25 E:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/4/24 22:27
   20k 2002/01/09 E:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu6.dll" v0.0 ts=2002/1/8 22:03
   29k 2003/08/09 E:\cygwin\bin\cygmenu7.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu7.dll" v0.0 ts=2003/8/9 2:25
   21k 2004/10/22 E:\cygwin\bin\cygminires.dll - os=4.0 img=1.0 sys=4.0
                  "cygminires.dll" v0.0 ts=2004/10/22 13:28
   67k 2006/03/24 E:\cygwin\bin\cygncurses++-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++-8.dll" v0.0 ts=2006/3/23 23:17
  156k 2001/04/25 E:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/4/24 22:29
  175k 2002/01/09 E:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++6.dll" v0.0 ts=2002/1/8 22:03
  227k 2006/03/24 E:\cygwin\bin\cygncurses-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses-8.dll" v0.0 ts=2006/3/23 20:51
  226k 2001/04/25 E:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/4/24 22:17
  202k 2002/01/09 E:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses6.dll" v0.0 ts=2002/1/8 22:03
  224k 2003/08/09 E:\cygwin\bin\cygncurses7.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses7.dll" v0.0 ts=2003/8/9 2:24
   12k 2006/03/24 E:\cygwin\bin\cygpanel-8.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel-8.dll" v0.0 ts=2006/3/23 23:16
   15k 2001/04/25 E:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/4/24 22:27
   12k 2002/01/09 E:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel6.dll" v0.0 ts=2002/1/8 22:03
   19k 2003/08/09 E:\cygwin\bin\cygpanel7.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel7.dll" v0.0 ts=2003/8/9 2:24
  109k 2006/02/10 E:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcre-0.dll" v0.0 ts=2006/2/9 18:37
  299k 2006/02/10 E:\cygwin\bin\cygpcrecpp-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcrecpp-0.dll" v0.0 ts=2006/2/9 18:38
    7k 2006/02/10 E:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpcreposix-0.dll" v0.0 ts=2006/2/9 18:37
   22k 2002/06/09 E:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
                  "cygpopt-0.dll" v0.0 ts=2002/6/8 22:45
  108k 2001/06/28 E:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 20:34
  148k 2003/08/10 E:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline5.dll" v0.0 ts=2003/8/10 16:16
  152k 2006/03/25 E:\cygwin\bin\cygreadline6.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline6.dll" v0.0 ts=2006/3/25 6:05
  230k 2006/06/01 E:\cygwin\bin\cygssl-0.9.7.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-0.9.7.dll" v0.0 ts=2006/6/1 8:50
  214k 2006/06/01 E:\cygwin\bin\cygssl-0.9.8.dll - os=4.0 img=1.0 sys=4.0
                  "cygssl-0.9.8.dll" v0.0 ts=2006/6/1 9:08
   65k 2005/08/23 E:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2005/8/22 19:03
 1831k 2006/07/24 E:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2006/7/23 17:11
    Cygwin DLL version info:
        DLL version: 1.5.21
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 156
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Sun Jul 23 20:11:16 EDT 2006
        Shared id: cygwin1S4


No Cygwin services found.


Cygwin Package Information
Last downloaded files to: C:\Cygwin Setup
Last downloaded files from: ftp://mirror.cpsc.ucalgary.ca/mirror/cygwin.com

Package              Version
_update-info-dir     00415-1
alternatives         1.3.20a-2
ash                  20040127-3
base-files           3.7-1
base-passwd          2.2-1
bash                 3.1-6
bzip2                1.0.3-1
coreutils            5.97-1
crypt                1.1-1
cvs                  1.11.17-1
cygrunsrv            1.17-1
cygutils             1.3.0-1
cygwin               1.5.21-1
cygwin-doc           1.4-3
diffutils            2.8.7-1
editrights           1.01-1
findutils            4.3.0-2
gawk                 3.1.5-4
gdbm                 1.8.3-7
grep                 2.5.1a-2
groff                1.18.1-2
gzip                 1.3.5-2
less                 381-1
libbz2_1             1.0.3-1
libcharset1          1.9.2-2
libgdbm              1.8.0-5
libgdbm-devel        1.8.3-7
libgdbm3             1.8.3-3
libgdbm4             1.8.3-7
libiconv             1.9.2-2
libiconv2            1.9.2-2
libintl              0.10.38-3
libintl1             0.10.40-1
libintl2             0.12.1-3
libintl3             0.14.5-1
libncurses5          5.2-1
libncurses6          5.2-8
libncurses7          5.3-4
libncurses8          5.5-2
libpcre0             6.6-1
libpopt0             1.6.4-4
libreadline4         4.1-2
libreadline5         4.3-5
libreadline6         5.1-5
login                1.9-7
make                 3.81-1
man                  1.5p-1
minires              1.00-1
mktemp               1.5-3
nano                 1.2.2-1
ncurses              5.5-2
openssh              4.3p2-3
openssl              0.9.8b-1
openssl097           0.9.7j-1
rcs                  5.7-3
run                  1.1.10-1
sed                  4.1.5-1
tar                  1.15.91-1
termcap              20050421-1
terminfo             5.5_20060323-1
texinfo              4.8-3
unzip                5.50-5
which                1.7-1
zip                  2.3-6
zlib                 1.2.3-1
Use -h to see help about each section

[-- Attachment #3: Type: text/plain, Size: 218 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 1.5.21: file timestamp not updated after editing
  2006-07-30 10:35 1.5.21: file timestamp not updated after editing Alex Eng
@ 2006-07-30 14:47 ` Corinna Vinschen
  2006-07-30 17:19   ` Alex Eng
  0 siblings, 1 reply; 4+ messages in thread
From: Corinna Vinschen @ 2006-07-30 14:47 UTC (permalink / raw)
  To: cygwin

On Jul 29 19:29, Alex Eng wrote:
> After editing a file, the timestamp on the file (according to ls -l)
> is unchanged.  However if stat <filename> is executed, the change
> timestamp given in the output differs from that given in ls -l:
> 
> $ ls -l foo.c
> -rw-r--r-- 1 Alex 126 Jul 29 17:10 foo.c
> $ nano foo.c
> ### File is edited and saved ###
> $ ls -l foo.c
> -rw-r--r-- 1 Alex 289 Jul 29 17:10 foo.c
> $ stat foo.c
>  File: `foo.c'
>  Size: 289             Blocks: 1          IO Block: 1024   regular file
> Device: a8dc98beh/2833029310d   Inode: 562949953426654  Links: 1
> Access: (0644/-rw-r--r--)  Uid: ( 1004/    Alex)   Gid: (  513/    None)
> Access: 2006-07-29 18:19:09.921875000 -0700
> Modify: 2006-07-29 17:10:44.531250000 -0700
> Change: 2006-07-29 18:19:15.828125000 -0700

I can't reproduce this problem at all.  Assuming nano changes the file
in place, opposed to editors like vim, which recreate the file on write,
then a simple open/write/close like this:

  #include <stdio.h>
  #include <errno.h>
  #include <sys/fcntl.h>

  int
  main (int argc, char **argv)
  {
    int fd = open (argv[1], O_WRONLY);
    if (fd < 0)
      {
	fprintf (stderr, "open(%s): %d <%s>\n",
		 argv[1], errno, strerror (errno));
	return 1;
      }
    --argc; ++argv;
    while (--argc > 0)
      {
	++argv;
	write (fd, *argv, strlen (*argv));
      }
    close (fd);
    return 0;
  }

would have the same effect.  It hasn't, at least not in my testing.
Is there a chance that you're suffering from a malice virus scanner?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 1.5.21: file timestamp not updated after editing
  2006-07-30 14:47 ` Corinna Vinschen
@ 2006-07-30 17:19   ` Alex Eng
  2006-07-31  8:37     ` Corinna Vinschen
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Eng @ 2006-07-30 17:19 UTC (permalink / raw)
  To: cygwin

On 7/30/06, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> On Jul 29 19:29, Alex Eng wrote:
> > After editing a file, the timestamp on the file (according to ls -l)
> > is unchanged.  However if stat <filename> is executed, the change
> > timestamp given in the output differs from that given in ls -l:
> >
> > $ ls -l foo.c
> > -rw-r--r-- 1 Alex 126 Jul 29 17:10 foo.c
> > $ nano foo.c
> > ### File is edited and saved ###
> > $ ls -l foo.c
> > -rw-r--r-- 1 Alex 289 Jul 29 17:10 foo.c
> > $ stat foo.c
> >  File: `foo.c'
> >  Size: 289             Blocks: 1          IO Block: 1024   regular file
> > Device: a8dc98beh/2833029310d   Inode: 562949953426654  Links: 1
> > Access: (0644/-rw-r--r--)  Uid: ( 1004/    Alex)   Gid: (  513/    None)
> > Access: 2006-07-29 18:19:09.921875000 -0700
> > Modify: 2006-07-29 17:10:44.531250000 -0700
> > Change: 2006-07-29 18:19:15.828125000 -0700
>
> I can't reproduce this problem at all.  Assuming nano changes the file
> in place, opposed to editors like vim, which recreate the file on write,
> then a simple open/write/close like this:
>
>   #include <stdio.h>
>   #include <errno.h>
>   #include <sys/fcntl.h>
>
>   int
>   main (int argc, char **argv)
>   {
>     int fd = open (argv[1], O_WRONLY);
>     if (fd < 0)
>       {
>         fprintf (stderr, "open(%s): %d <%s>\n",
>                  argv[1], errno, strerror (errno));
>         return 1;
>       }
>     --argc; ++argv;
>     while (--argc > 0)
>       {
>         ++argv;
>         write (fd, *argv, strlen (*argv));
>       }
>     close (fd);
>     return 0;
>   }
>
> would have the same effect.  It hasn't, at least not in my testing.
> Is there a chance that you're suffering from a malice virus scanner?
>
>
> Corinna
>
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Project Co-Leader          cygwin AT cygwin DOT com
> Red Hat
>
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
>
>

I disabled Norton Antivirus 2005 and ZoneAlarm firewall, but the
problem is still present.

I did some further troubleshooting and found that this problem doesn't
occur anymore if I'm running Cygwin while Windows XP is in safe mode.
But it happens again if I start Windows using the "Safe Mode With
Networking" option.  I've been able to reproduce this consistently.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 1.5.21: file timestamp not updated after editing
  2006-07-30 17:19   ` Alex Eng
@ 2006-07-31  8:37     ` Corinna Vinschen
  0 siblings, 0 replies; 4+ messages in thread
From: Corinna Vinschen @ 2006-07-31  8:37 UTC (permalink / raw)
  To: cygwin

On Jul 30 09:27, Alex Eng wrote:
> On 7/30/06, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> >On Jul 29 19:29, Alex Eng wrote:
> >> After editing a file, the timestamp on the file (according to ls -l)
> >> is unchanged.  However if stat <filename> is executed, the change
> >> timestamp given in the output differs from that given in ls -l:
> >>
> >> $ ls -l foo.c
> >> -rw-r--r-- 1 Alex 126 Jul 29 17:10 foo.c
> >> $ nano foo.c
> >> ### File is edited and saved ###
> >> $ ls -l foo.c
> >> -rw-r--r-- 1 Alex 289 Jul 29 17:10 foo.c
> >> $ stat foo.c
> >>  File: `foo.c'
> >>  Size: 289             Blocks: 1          IO Block: 1024   regular file
> >> Device: a8dc98beh/2833029310d   Inode: 562949953426654  Links: 1
> >> Access: (0644/-rw-r--r--)  Uid: ( 1004/    Alex)   Gid: (  513/    None)
> >> Access: 2006-07-29 18:19:09.921875000 -0700
> >> Modify: 2006-07-29 17:10:44.531250000 -0700
> >> Change: 2006-07-29 18:19:15.828125000 -0700
> >
> >I can't reproduce this problem at all.  [...]
> 
> I disabled Norton Antivirus 2005 and ZoneAlarm firewall, but the
> problem is still present.
> 
> I did some further troubleshooting and found that this problem doesn't
> occur anymore if I'm running Cygwin while Windows XP is in safe mode.
> But it happens again if I start Windows using the "Safe Mode With
> Networking" option.  I've been able to reproduce this consistently.

This points to some bad interaction with another piece of software on
your machine.  Probably something which installed a driver module.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-07-31  7:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-30 10:35 1.5.21: file timestamp not updated after editing Alex Eng
2006-07-30 14:47 ` Corinna Vinschen
2006-07-30 17:19   ` Alex Eng
2006-07-31  8:37     ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).