View Single Post
Old 16th September 2015
gso gso is offline
Port Guard
 
Join Date: Nov 2014
Posts: 35
Default

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.
Reply With Quote