Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <41E5385D.5090207@sneakemail.com> Date: Wed, 12 Jan 2005 15:46:53 +0100 From: =?ISO-8859-1?Q?Peter_Valdemar_M=F8rch?= User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: nohup "broken" after update of cygwin from 1.5.9->1.5.12 -- keychain and ssh-agent broken at least... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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/