Added exceptionhandling for the ssh-agent killing

This commit is contained in:
Konstantinos Vaggelakos 2011-11-02 21:48:43 +01:00
parent ce2f8b99f5
commit 639a777bfe

View file

@ -1152,8 +1152,8 @@ namespace SparkleShare {
try {
int pid = Int32.Parse (System.Environment.GetEnvironmentVariable ("SSH_AGENT_PID"));
Process.GetProcessById (pid).Kill ();
} catch (Exception e) {
// Handle exception if needed
} catch (ArgumentException) {
SparkleHelpers.DebugInfo ("SSH", "Could not kill the ssh-agent, due to the process wasn't running");
}
#endif
}