1
See following example:
[STEP 101] # tty
/dev/pts/3
[STEP 102] # ssh -f -n -N -D :7070 127.0.0.1
[STEP 103] # pgrep -lf 7070
33109 ssh
[STEP 104] # ls -l /proc/33109/fd/
total 0
lrwx------ 1 root root 64 2016-11-08 10:45 0 -> /dev/pts/3
lrwx------ 1 root root 64 2016-11-08 10:45 1 -> /dev/pts/3
lrwx------ 1 root root 64 2016-11-08 10:45 2 -> /dev/pts/3
lrwx------ 1 root root 64 2016-11-08 10:45 3 -> socket:[3328390]
lrwx------ 1 root root 64 2016-11-08 10:45 4 -> socket:[3328441]
[STEP 105] # ps t pts/3
PID TTY STAT TIME COMMAND
33115 pts/3 R+ 0:00 ps t pts/3
66586 pts/3 Ss 0:08 /root/bin/bash
[STEP 106] #
In step 104 it shows the ssh
process is opening pts/3
but why the ps t pts/3
command in step 105 cannot see it?