Help for this page

Select Code to Download


  1. or download this
    $ ps axf -o pid,ppid,pgrp,cmd
      PID  PPID  PGRP CMD
    ...
    29307  4061 29307      \_ /usr/bin/perl ./661639.pl
    29309 29307 29307          \_ sh -c cat /dev/urandom > testfile
    29310 29309 29307              \_ cat /dev/urandom
    
  2. or download this
    kill -15 => getpgrp($pid);  # process group of child
    kill -15 => getpgrp;        # process group of current process (the sc
    +ript)
    
    # or even (as $$ equals the process group in this case):
    kill -15 => $$;