lsof(8) -a -p $$ -d0,1,2
list open files
-a       This option causes list selection options to be ANDed, as described above.
-p s     This option excludes or selects the listing of files for the processes  whose  optional  process
         IDentification  (PID)  numbers are in the comma-separated set s - e.g., ``123'' or ``123,^456''.
         (There should be no spaces in the set.)

         PID numbers that begin with `^' (negation) represent exclusions.

         Multiple process ID numbers are joined in a single ORed set before participating in  AND  option
         selection.   However,  PID exclusions are applied without ORing or ANDing and take effect before
         other selection criteria are applied.
-d s     This option specifies a list of file descriptors (FDs) to exclude from or include in the  output
         listing.   The  file descriptors are specified in the comma-separated set s - e.g., ``cwd,1,3'',
         ``^6,^2''.  (There should be no spaces in the set.)

                The list is an exclusion list if all entries of the set begin with '^'.  It is an inclusion list
                if no entry begins with '^'.  Mixed lists are not permitted.

                A  file  descriptor  number  range  may  be  in the set as long as neither member is empty, both
                members are numbers, and the ending member is larger than the starting one -  e.g.,  ``0-7''  or
                ``3-10''.   Ranges  may  be specified for exclusion if they have the '^' prefix - e.g., ``^0-7''
                excludes all file descriptors 0 through 7.

                Multiple file descriptor numbers are joined in a single ORed set  before  participating  in  AND
                option selection.

                When there are exclusion and inclusion members in the set, lsof reports them as errors and exits
                with a non-zero return code.

                See the description of File Descriptor (FD)  output  values  in  the  OUTPUT  section  for  more
                information on file descriptor names.
source manpages: lsof