From ce2f8b99f5d1fe6025a772657e85812dd6bbb5ef Mon Sep 17 00:00:00 2001 From: Konstantinos Vaggelakos Date: Sat, 29 Oct 2011 19:26:42 +0200 Subject: [PATCH] Adjusted the code regarding to wimh's comment. Now the SSH_AGENT is killed on application exit --- SparkleShare/SparkleControllerBase.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index bba430fe..03f71f39 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -1148,13 +1148,10 @@ namespace SparkleShare { #else System.Windows.Forms.Application.Exit (); - // Also kill the SSH_AGENT + // Also kill the SSH_AGENT that we started try { - // Check if we created the process, if so bring it down. Else leave it running - if (!System.Environment.GetEnvironmentVariable ("SSH_AUTH_SOCK").Equals ("unknown")) { - int pid = Int32.Parse (System.Environment.GetEnvironmentVariable ("SSH_AGENT_PID")); - Process.GetProcessById (pid).Kill (); - } + int pid = Int32.Parse (System.Environment.GetEnvironmentVariable ("SSH_AGENT_PID")); + Process.GetProcessById (pid).Kill (); } catch (Exception e) { // Handle exception if needed }