Commit 5bd9500b authored by Marc Cornellà's avatar Marc Cornellà
Browse files

ssh-agent: check ssh-agent process w/ ps again

The alternative is using tools that aren't available everywhere.
The latest report is that cygwin/msys2 doesn't have pgrep.

Fixes #5418.
parent 5cf92639
...@@ -30,7 +30,7 @@ if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then ...@@ -30,7 +30,7 @@ if [[ $_agent_forwarding == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
elif [[ -f "$_ssh_env_cache" ]]; then elif [[ -f "$_ssh_env_cache" ]]; then
# Source SSH settings, if applicable # Source SSH settings, if applicable
. $_ssh_env_cache > /dev/null . $_ssh_env_cache > /dev/null
pgrep ssh-agent | grep -q $SSH_AGENT_PID || { ps x | grep ssh-agent | grep -q $SSH_AGENT_PID || {
_start_agent _start_agent
} }
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment