1mNAME0m
       pid - Retrieve process identifiers

1mSYNOPSIS0m
       1mpid 22m?4mfileId24m?


1mDESCRIPTION0m
       If  the  4mfileId24m  argument  is  given then it should normally refer to a
       process pipeline created with the 1mopen 22mcommand.  In this case  the  1mpid0m
       command  will  return a list whose elements are the process identifiers
       of all the processes in the pipeline, in order.  The list will be empty
       if  4mfileId24m refers to an open file that isn't a process pipeline.  If no
       4mfileId24m argument is given then 1mpid 22mreturns the process identifier of the
       current  process.   All  process  identifiers  are  returned as decimal
       strings.

1mEXAMPLE0m
       Print process information about the processes in a pipeline  using  the
       SysV 1mps 22mprogram before reading the output of that pipeline:

              set pipeline [open "| zcat somefile.gz | grep foobar | sort -u"]
              # Print process information
              exec ps -fp [1mpid 22m$pipeline] >@stdout
              # Print a separator and then the output of the pipeline
              puts [string repeat - 70]
              puts [read $pipeline]
              close $pipeline


1mSEE ALSO0m
       exec(n), open(n)


1mKEYWORDS0m
