Help for this page

Select Code to Download


  1. or download this
         if (-d "/proc/$pid") { ... }
  2. or download this
        sub GetProcessCommand
        {
                my ($pid) = @_;
    
                return (open (PID, "/proc/$pid/cmdline") && <PID>);
        }
    
  3. or download this
        # Check for buddy named 'xyz-proc'
        if (GetProcessCommand($pid) =~ /xyz\-proc/) { ... }