2

I've installed msysgit Git-1.7.10-preview20120409.exe from here http://code.google.com/p/msysgit/downloads/list on my Windows Server 2003 64-bit machine. I included "Git Bash here" during the setup. When I select "Git Bash here" for any folder listed in Windows Explorer I get

C:\Program Files (x86)\Git\bin\sh.exe: * fork: can't reserve memory for stack 0x490000 - 0x690000, Win32 error 0 0 [main] sh.exe" 1348 sync_with_child: child 2612(0xF8) died before initia lization with status code 0x1 145 [main] sh.exe" 1348 sync_with_child: * child state waiting for longjmp

sh.exe": fork: Resource temporarily unavailable sh.exe"-3.1$

But, the Start Menu item Git, Git Bash does not encounter the same problem. Instead I get

Welcome to Git (version 1.7.10-preview20120409)

Run 'git help git' to display the help index. Run 'git help ' to display help for specific commands.

dmoore@DC1-2K3 ~ $

I suppose the Windows Explorer shell extension should use c:\windows\syswow64\cmd.exe but I don't know how to tell it to do that.

Any suggestions are much appreciated, DaleEMoore@gMail.Com

Dale E. Moore
  • 431
  • 7
  • 19

3 Answers3

3

OK, so it looks like on 64-bit XP and Server 2003, the 64-bit (default) wscript process can't properly launch bash, and since that's how the menu entry is set up in the registry, it's causing this issue while the start menu shortcut explicitly specifies the syswow64 version.

The solution is to edit the registry key HKEY_CLASSES_ROOT\Directory\shell\git_shell\command "default" value.

It probably looks like wscript "C:\Program Files (x86)\Git\Git Bash.vbs" "%1"

Change it to something like C:\Windows\SysWOW64\wscript "C:\Program Files (x86)\Git\Git Bash.vbs" "%1" as appropriate (if your windows directory is elsewhere, etc.)

This should be brought up as a bug with the git for windows people, unfortunately it looks like they closed their bug tracker.

Ryan Pavlik
  • 1,723
  • 1
  • 11
  • 20
  • I listed it and the fix as [issue 8](https://github.com/msysgit/git/issues/8) on [msysgit/git](https://github.com/msysgit/git) – Mark Mikofski May 23 '12 at 15:55
  • My pull request was merged - looks like you found a further bug (regarding file associations) so that can probably be re-opened and fixed in a similar way. – Ryan Pavlik May 24 '12 at 15:45
  • the shell script file association in x64 that [@rpavlik](http://stackoverflow.com/users/265522/rpavlik) mentioned is fixed too see [pull request/issue #26](https://github.com/msysgit/msysgit/pull/26) – Mark Mikofski Jun 12 '12 at 16:57
3

On Windows XP 64

[HKEY_CLASSES_ROOT\VBSFile\Shell\Open\Command]

change the default from "%SystemRoot%\System32\WScript.exe "%1" %*"

to "%SystemRoot%\SysWOW64\WScript.exe "%1" %*"

none
  • 31
  • 1
  • Yes, correct. Similarly, running a shell/Bash script on 64-bit Windows under MinGW, started from a batch file is something like: `%WINDIR%\SysWOW64\cmd.exe /C C:\PRG\MinGW-1_0_17\msys\1.0\bin\bash.exe "%SCRIPTFOLDER%\SomeBashScript.sh"`. This will fix the `fork: can't reserve memory for stack 0x4A0000 - 0x6A0000, Win32 error 0` error... – Peter Mortensen Jan 06 '17 at 23:13
0

Randomly I got the '* fork ...' error message for the mingw bash on an other project (I guess mingw is the origin of the sh installed by git - it is definitely the same error message). I could fix the problem by replacing the shell with win-bash

V15I0N
  • 396
  • 4
  • 17