Thread
:
Returning the PID of a ssh process
View Single Post
#
19
(View Single Post)
16th September 2015
gso
Port Guard
Join Date: Nov 2014
Posts: 35
I think I see your point about using the ppid:
Code:
pgrep -P $$ -x ssh
A process timestamp can be cached also:
Code:
ps -o lstart= -p PID
However assuming a control socket can be closed following reading the PID then this might be a preferable approach for some people.
gso
View Public Profile
Find all posts by gso