walkor 10 年之前
父節點
當前提交
6acd084cb2
共有 1 個文件被更改,包括 4 次插入0 次删除
  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')