Cygwin Notes

Cygwin has some odd foibles and niceities, and this page tracks some of them.

Process ID Shortage

Cygwin does some weird stuff sometimes. For example I keep running into this problem and not being able to find the solution easily:

676102803 [main] zsh 840377 fork_copy: user/cygwin data 
   pass 2 failed, 0x970000..0xAF3000, done 0, windows 
   pid 4294640815, Win32 error 8
withcd: fork failed: resource temporarily unavailable

This is due to it running out of PIDs. I noted the problem and solution on Swhack; basically you have to run "rebaseall", but that means closing down all of your current processes and actually running it in bash which is somewhat irritating. If anyone has a better solution, I'd be glad if they could let me know. Thanks.

Startup

I don't use a cygwin.bat file, just a Windows shortcut containing the following:

rxvt -sl 10000 -fg lightgray -bg black 
   -tn xterm -e ssh-agent /bin/zsh --login -i

This works nicely with /bin/zsh from the cygwin package, whereas my /usr/local/bin/zsh was giving "zsh: fork failed: permission denied" in the homedir all the time for some reason.

The shell then uses my .shellrc on initialization.

More Rebaseall Help

Someone just emailed me asking for more information about how to solve the process IDs problem, and this is what I replied to him:

Heh, that is an annoying problem. Basically you have to install the rebase package first; you can do this from the setup.exe program that you got when you installed cygwin the first time. You may already have it installed, of course, and you can find out by typing:

   $ which rebaseall

Once it's installed, you need to run:

   $ rebaseall 

You need to make sure that no other programs are running in cygwin before you run that; but once you've run it, everything should work again. Unfortunately, I find it's only a temporary fix, and the best method is to not run whatever it was that was taking all the process IDs up in the first place, sadly.

work http://swhack.com/logs/2005-03-23#T21-59-59 in

Sean B. Palmer