git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] "sleep 1" sleeps too little on cygwin

From
Junio C Hamano <junkio@cox.net>
Date
Jan 19, 2006, 01:18 UTC
Message-ID
<7vmzhtqakl.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060118185229.GA3001@steel.home>
Alex Riesen <raa.lkml@gmail.com> writes:
> this is probable unsafe too: not all systems export inodes
> (the recent cygwin breakage comes to mind).

Hmph. I thought that breakage was about struct dirent, not what we read from struct stat; d_ino is XSI extension so that may have been the reason cygwin folks removed it, but st_ino is in BASE --- did they remove that as well?

But you are right. Among "struct stat" members, only S_IFMT part from st_mode and st_size are meaningful for symlinks after lstat() and other members are unspecified. Which means that, in the strictest sense, the original test that tried to see if the timestamp change makes the entry for the symlink cache-dirty, was pointless.

HOWEVER.

We live in the real world, not in a strict POSIX world. We (the index file) relies on lstat() to update st_mtime and/or st_ino, and I think it is OK (IOW, we declare that platforms on which we cannot rely on these members are not worth supporting).

By the way, if you have an access to git on cygwin with FAT, could you test your patch ($SECONDS) and then i-num patch (the machine with cygwin I can borrow has only NTFS) please?

Previous: Alex RiesenNext: Christopher Faylor
Message 10 of 22 in “"sleep 1" sleeps too little on cygwin”
  1. "sleep 1" sleeps too little on cygwinAlex Riesen, Jan 17, 2006
  2. Junio C HamanoJan 18, 2006
  3. Alex RiesenJan 18, 2006
  4. Junio C HamanoJan 18, 2006
  5. Christopher FaylorJan 19, 2006
  6. Junio C HamanoJan 18, 2006
  7. Johannes SchindelinJan 18, 2006
  8. Junio C HamanoJan 18, 2006
  9. Alex RiesenJan 18, 2006
  10. Junio C HamanoJan 19, 2006
  11. Christopher FaylorJan 19, 2006
  12. Alex RiesenJan 19, 2006
  13. Junio C HamanoJan 19, 2006
  14. Alex RiesenJan 19, 2006
  15. Junio C HamanoJan 20, 2006
  16. Christopher FaylorJan 19, 2006
  17. Alex RiesenJan 19, 2006
  18. Christopher FaylorJan 19, 2006
  19. Junio C HamanoJan 20, 2006
  20. Christopher FaylorJan 20, 2006
  21. Alex RiesenJan 20, 2006
  22. Christopher FaylorJan 20, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.