Skip to content

Avoid ps scan when checking ssh-agent startup state#2139

Open
DannyStoll1 wants to merge 1 commit intosorin-ionescu:masterfrom
DannyStoll1:fix/ssh-agent-startup-check
Open

Avoid ps scan when checking ssh-agent startup state#2139
DannyStoll1 wants to merge 1 commit intosorin-ionescu:masterfrom
DannyStoll1:fix/ssh-agent-startup-check

Conversation

@DannyStoll1
Copy link
Copy Markdown

@DannyStoll1 DannyStoll1 commented Apr 10, 2026

Replace the startup-time ps -U "$LOGNAME" -o pid,ucomm | grep ... check in the SSH module with a cheaper validity check based on SSH_AGENT_PID, kill -0, and the configured auth socket.

The current check can block intermittently on process-list scans, making interactive shell startup time highly inconsistent on busy systems, in some cases taking multiple seconds.

Fixes #2140.

@DannyStoll1 DannyStoll1 marked this pull request as ready for review April 10, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent slow startup times with ssh module

1 participant