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

Re: git 0.99.7b doesn't build on Cygwin

From
Linus Torvalds <torvalds@osdl.org>
Date
Sep 24, 2005, 02:46 UTC
Message-ID
<Pine.LNX.4.58.0509231935360.3308@g5.osdl.org>
In-Reply-To
<Pine.LNX.4.63.0509240305450.26220@wgmdd8.biozentrum.uni-wuerzburg.de>
On Sat, 24 Sep 2005, Johannes Schindelin wrote:
> 
> BTW I am fairly convinced that the same issues would trouble a git-pull, 
> once the networking is running, since the pack transfer relies on 
> fork()ing.
I'm not sure.

Almost all other fork() users end up doing a more-or-less immediate execve() after the fork. Yes, they do some other minor setup, but not a whole lot.

The diff.c fork() is somewhat different. It actually ends up doing malloc and stdio IO before it actually gets to the exec(), so that one is more likely to hit any bugs in the fork() implementation.

Actually, looking a bit closer, the create_pack_file() thing also does malloc inside the child, but at least there it would be trivial to move that argument setup code into the parent.

But looking at send_pack() or fetch_pack(), for example, they are both _very_ traditional fork()+exec() calls, with just a few close() calls in between.

Looking a bit closer at the diff() usage, I actually think that we could move the fork() closer to the exec - we'd just have to move it _into_ all the different cases (ie you'd have two different fork() calls: one for the "builtin" case, one for the external pgm case, but then the child in both cases would be very simple).

Oh. Actually, I wonder if we could mke them "vfork()" calls. Does anybody know if cygwin has an easier time with vfork() + eventual exec? That _should_ map better to a non-UNIX process model, so maybe we could do it that way?

> It sure would be nice to have a unified diff generator included, but I 
> doubt that a reliable (=simple) one is easy to come by.

Yeah, I looked at GNU diffutils, and I had to rinse out my eyes with soap and water.

		Linus
Previous: Johannes SchindelinNext: Junio C Hamano
Message 14 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.