1.5.24: rxvt or console fail to shutdown due to ssh -f still running despite setsid()
Mon Apr 9 15:30:00 GMT 2007
I originally reported this in October 2006
>>> When I log out of or shutdown my Windows login session, if I had a
>>> background process that I started within a Win32 rxvt session, I get an
>>> error that rxvt00000<some other hex numbers> has not shut down. For
>>> example if I use ssh -f or run ssh in the background using &, this
>>> symptom manifests.
>>> I can also see a related symptom if I am running using a Windows
>>> console. When I log out of bash, the console window will stick around
>>> until the ssh process is killed.
>>> I would like for these console windows and hidden rxvt windows to shut
>>> down without further confirmation. Is there a way to do this? Or a good
>>> I have Googled for this problem, and while I have found other related
>>> problems (such as ssh-agent continuing to run) I have not found any
>>> solutions for this case.
>> "man nohup", "man setsid", in bash: "help disown".
> Thanks, setsid works fine if I do not need to enter a password but
> unfortunately will not work if I am using ssh -f to get an interactive
> password before forking.
> Looking in the openssh source, I can see that ssh -f calls daemon(),
> which should call setsid(). Is that correct? If so, why is it still
> hanging onto the terminal?
I have just checked the source for the daemon() function and the setsid
executable. They both call fork() and then setsid(). Do the console/rxvt
process stick after calling ssh -f because file descriptors are left
open? Can you suggest a strategy to deal with this?
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin