Exemple #1
0
 /**
  * Kills commands, which syntax is similar to this command
  */
 public function killSimilar()
 {
     if (OS::WIN === OS::getCurrentOs()) {
         throw new OsNotSupportedExeception();
     }
     $command = Command::create()->app('ps')->arg('aux')->app('grep')->input('"' . $this->prepareForProcessLog($this->command->getRaw()) . '"')->xargsApp()->input('awk', 'kill')->app1()->input('print $2')->exec();
 }