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

Re: git 0.99.7b doesn't build on Cygwin

From
DLDavide Libenzi <davidel@xmailserver.org>
Date
Sep 24, 2005, 19:12 UTC
Message-ID
<Pine.LNX.4.63.0509241129300.31327@localhost.localdomain>
In-Reply-To
<Pine.LNX.4.58.0509241102450.3308@g5.osdl.org>
On Sat, 24 Sep 2005, Linus Torvalds wrote:
Show 12 quoted lines
>
>
> On Fri, 23 Sep 2005, Davide Libenzi wrote:
>>
>> If you have only to run diff/patch, just use the native Win32 CreateProcess().
>> You abstract that on a git_exec(), and you use fork/exec on Unix and
>> CreateProcess() on Winblows. If fork() is slow on Cygwin, fork+exec is
>> pathetic. They do all that work to give you a fork(), and you throw it
>> away with an exec().
>
> CreateProcess doesn't work all that well, since we want to dup file
> descriptors around and close them in the child.

You can do that (dup stuff and pass them around) even with CreateProcess(), if you want. Yes, the interface sucks (zillions of parameters/flags) ;)

Show 17 quoted lines
> In general, CreateProcess() is a totally crap interface. I realize it's
> common (and especially in the VMS/Windows world it's how things are done),
> but hey, at that point it's better if somebody just waits until git is
> stable, and just makes a totally separate "git for windows" thing. The
> interfaces are certainly simple. There's no point in trying to maintain
> one tree.
>
> However, vfork() really _is_ a nice interface. It's faster even on UNIX,
> and at least in theory it should be possible to do an efficient vfork()
> implementation on top of crap like windows. Does cygwin support that well?
>
> Yes, git uses lots of filesystem stuff, and they suck under windows. Maybe
> cygwin adds its own overhead, but from everything I've ever been able to
> tell, filesystem access sucks under Windows regardless of any cygwin
> stuff. Add to an already slow FS interface the fact that virus checkers
> tend to hook into it and make it _even_slower_, and hey, you have a truly
> sucky OS.

I also realized that git plays/handles with unix permissions too, and this might make the "interface layer" not so small. Dunno about vfork() on Cygwin, but if you really care about performance on Windows, I'd rather remove the external program execution and use an in-process diff library.

- Davide
Previous: Linus TorvaldsNext: Junio C Hamano
Message 18 of 38 in “git 0.99.7b doesn't build on Cygwin”
  1. Peter TB BrettSep 23, 2005
  2. Johannes SchindelinSep 23, 2005
  3. Peter TB BrettSep 23, 2005
  4. Martin LanghoffSep 23, 2005
  5. Petr BaudisSep 23, 2005
  6. Linus TorvaldsSep 24, 2005
  7. Linus TorvaldsSep 24, 2005
  8. Junio C HamanoSep 25, 2005
  9. Implementing diff, was Re: git 0.99.7b doesn't build on CygwinJohannes Schindelin, Sep 25, 2005
  10. Davide LibenziSep 25, 2005
  11. Linus TorvaldsSep 25, 2005
  12. Davide LibenziSep 25, 2005
  13. Johannes SchindelinSep 24, 2005
  14. Linus TorvaldsSep 24, 2005
  15. Junio C HamanoSep 24, 2005
  16. Davide LibenziSep 24, 2005
  17. Linus TorvaldsSep 24, 2005
  18. Davide LibenziSep 24, 2005
  19. Junio C HamanoSep 24, 2005
  20. Davide LibenziSep 24, 2005
  21. Junio C HamanoSep 24, 2005
  22. Junio C HamanoSep 24, 2005
  23. Davide LibenziSep 24, 2005
  24. Linus TorvaldsSep 24, 2005
  25. Linus TorvaldsSep 24, 2005
  26. Linus TorvaldsSep 25, 2005
  27. Jon LoeligerSep 26, 2005
  28. Junio C HamanoSep 26, 2005
  29. Davide LibenziSep 24, 2005
  30. Giuseppe BilottaSep 25, 2005
  31. Junio C HamanoSep 26, 2005
  32. Davide LibenziSep 26, 2005
  33. Giuseppe BilottaSep 26, 2005
  34. H. Peter AnvinSep 26, 2005
  35. Davide LibenziSep 26, 2005
  36. H. Peter AnvinSep 26, 2005
  37. Daniel BarkalowSep 25, 2005
  38. Davide LibenziSep 24, 2005

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.