I am using latest release of cygwin. I use cygwin by running separate cygwin windows on my Windows XP rather than X windows. I want to run keychain when a window starts. This causes ssh-agent to run (I do this conditionally on another one being in existence). All these windows are invoked as bash login windows and are listed as "con" when I run ps. When I do exit/^D/logout from the window, window hangs unless ssh-agent is first deleted. My current workaround is to count the number of cygwin windows open and when the final one is exited I kill the ssh-agent. This doesn't permit the persistance that is a feature of keychain. Note this is probably a problem with ssh-agent under cygwin, but could perhaps be sorted for keychain users by use of nohup or similar. Reproducible: Always Steps to Reproduce: 1. Add ssh-agent and ssh-add or keychain commands to .bash_profile 2. exit 3. Actual Results: Window hangs and will not close except using X button Expected Results: window should have terminated
You don't mention how you login to your session, but if you're using ssh, the ssh session will not close if there are processes running in your session (as long as these programs have input or output open from the terminal session). I think this is intentional behaviour from the ssh programmers.
Additional info: I do not need to actually run ssh for this problem. I open a cygwin window on local Win XP Professional machine which via .bash_profile runs keychain (and therefore ssh-agent and ssh-add). If I then logout of or close that window (regardless of whether I have run any ssh sessions) the window won't close unless I kill it directly. I have been in contact with agriffis@gentoo.org directly about this. Also, checkout http://sourceware.org/ml/cygwin/2005-05/msg01333.html someone else seems to have the same problem.
This is a Gentoo bugzilla, not a Cygwin one.