Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <BAY19-F31F02E85E38B7E1DCDD02BB5630@phx.gbl>
X-Originating-Email: [karlm30@hotmail.com]
X-Sender: karlm30@hotmail.com
In-Reply-To: <421CBB48.8040406@kleckner.net>
From: "Karl M" <karlm30@hotmail.com>
To: cygwin@cygwin.com
Subject: Re: ssh-agent and /tmp/ssh-* removal at logout
Date: Wed, 23 Feb 2005 09:27:06 -0800
Mime-Version: 1.0
Content-Type: text/plain; format=flowed
X-OriginalArrivalTime: 23 Feb 2005 17:28:01.0222 (UTC) FILETIME=[06284660:01C519CD]
X-IsSubscribed: yes



>From: Jim Kleckner
>Subject: Re: ssh-agent and /tmp/ssh-* removal at logout
>Date: Wed, 23 Feb 2005 09:20:08 -0800
>
>Corinna Vinschen wrote:
>
>>On Feb 23 06:18, Jim Kleckner wrote:
>>
>>>ssh-agent leaves stale directories named /tmp/ssh-xxxx
>>>that contain the named pipe for authentication.
>>>These left over directories come about when you log out
>>>or shut down the computer without stopping ssh-agent
>>>either by running keychain to shut it down or sending it
>>>a SIGHUP to exit and clean up.
>>>
>>>Could ssh-agent catch the shutdown message and thus
>>>do the proper cleanup?  What would that entail?
>
>[snip]
>
>>But it's correct behaviour.  A forcefully killed process usually isn't
>>in the shape to make cleanup tasks.
>>
>>
>>Corinna
>
>I guess a better way of phrasing my question would be:
>Many Windows applications receive a notification on logout or
>shutdown that allows them to take an action prior to being
>killed (including dialogs with the user).  Is there any practical
>way to use this for ssh-agent (or other cygwin processes)?
>For example, could the cygwin subsystem receive this notification
>and send a SIGHUP to the process?  I'm guessing that the
>answer is that it is not practical.
>
>Jim
>
ssh-agent does not need to be aware of this. keychain can handle it. I 
currently trap the TERM signal in my keychain service and cleanly stop the 
ssh-agent via keychain, so it no longer leaves the tmp folders around.

Thanks,

...Karl



--
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/

