walkor 10 gadi atpakaļ
vecāks
revīzija
6acd084cb2
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  1. 4 0
      Worker.php

+ 4 - 0
Worker.php

@@ -536,6 +536,10 @@ class Worker
         // 根据命令做相应处理
         switch($command)
         {
+            case 'kill':
+                exec("ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGINT");
+                exec("ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGKILL");
+                break;
             // 启动 workerman
             case 'start':
                 if($command2 === '-d')