original_string: protected function killProcess($pid, $sig, $wait = 0)
      {
          Process::kill($pid, $sig);
  
          if ($wait) {
              $start = time();
  
              do {
                  if (! $this->isRunning($pid)) {
                      break;
                  }
  
                  usleep(100000);
              } while (time() < $start + $wait);
          }
  
          return $this->isRunning($pid);
      }
code: protected function killProcess($pid, $sig, $wait = 0)
      {
          Process::kill($pid, $sig);
  
          if ($wait) {
              $start = time();
  
              do {
                  if (! $this->isRunning($pid)) {
                      break;
                  }
  
                  usleep(100000);
              } while (time() < $start + $wait);
          }
  
          return $this->isRunning($pid);
      }
code_tokens: protected function killProcess ( $ pid , $ sig , $ wait = 0 ) { Process :: kill ( $ pid , $ sig ) ; if ( $ wait ) { $ start = time ( ) ; do { if ( ! $ this -> isRunning ( $ pid ) ) { break ; } usleep ( 100000 ) ; } while ( time ( ) < $ start + $ wait ) ; } return $ this -> isRunning ( $ pid ) ; }
docstring: Kill process.
  
  @param int $pid
  @param int $sig
  @param int $wait
  
  @return bool
docstring_tokens: Kill process .