Mail Archives: cygwin/2005/01/12/09:47:15
Hi there,
My problem seems to boil down to this: If I have this simple batch file
and dbl. click on it:
\cygwin\bin\bash -c "/usr/bin/nohup /usr/bin/ssh-agent -s"
With 1.5.9, this batch file would finish, the MS-DOS box would
disappear, and ssh-agent would be operative and in the task list. With
1.5.12, the MS-DOS box lingers on, and if I close the MS-DOS box,
ssh-agent is killed.
Any idea why?
Here is the output from uname -a (new/old):
CYGWIN_NT-5.1 pvmXP 1.5.12(0.116/4/2) 2004-11-10 08:34 i686 unknown
unknown Cygwin
CYGWIN_NT-5.1 pvmXP 1.5.9(0.112/4/2) 2004-03-18 23:05 i686 unknown
unknown Cygwin
I don't mind supplying /etc/setup/installed.db, but don't know what to
show...
Details:
I have a batch file in my Start\Programs\Startup folder that ran
/usr/bin/keychain with this .bat syntax:
\cygwin\bin\bash -c "keychain `ls ~/.ssh/id*|grep -v '\.pub$'`"
It used to prompt me for my password, then finish (and the MS-DOS box
went away).
However, after updating today to the most recent "of everything", now
the behavior has changed. The MS-DOS box just sits there. If I try to
close it, I get the Windows "End Program" window, and closing it, kills
ssh-agent.
After the upgrade, I now have to start ssh-agent myself very carefully.
(see code snippet below in batch file diff)
/usr/bin/keychain is identical to what it was.
Peter
Here is what I had to add:
--- startxwin.bat (revision 796)
+++ startxwin.bat (working copy)
@@ -172,6 +172,14 @@
REM Set "Start in" to C:\cygwin\bin
REM
+run bash -c "ps -ef | grep ssh-agent >/dev/null || ssh-agent | grep -v
'Agent pid'> ~/.keychain/`uname -n`-sh"
+echo Waiting for ssh-agent to "get registered"...
+bash -c "while ! (ps -ef | grep ssh-agent >/dev/null ) ; do echo '
1sec...' ; sleep 1 ; done"
+
\cygwin\bin\bash -c "keychain `ls ~/.ssh/id*|grep -v '\.pub$'`"
REM Startup an xterm, using bash as the shell.
--
Peter Valdemar Mørch
http://www.morch.com
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -