Show file descriptors in Linux
ls -l /proc/{{ PID }}/fd
where
{{ PID }}
is the PID of the process.
0, 1, 2 are STDIN, STDOUT and STDERR respectively.