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);
    }
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);
    }
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 ) ; }
Kill process.

@param int $pid
@param int $sig
@param int $wait

@return bool
Kill process .