walkor 9 gadi atpakaļ
vecāks
revīzija
ce03c1f909
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      Worker.php

+ 4 - 2
Worker.php

@@ -616,14 +616,16 @@ class Worker
                 self::log("Workerman[$start_file] already running");
                 exit;
             }
-        } elseif ($command !== 'start' && $command !== 'restart') {
+        } elseif ($command !== 'start' && $command !== 'restart' && $command !== 'kill') {
             self::log("Workerman[$start_file] not run");
+            exit;
         }
 
-        // Execure command.
+        // execute command.
         switch ($command) {
             case 'kill':
                 exec("ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGINT");
+                usleep(100000);
                 exec("ps aux | grep $start_file | grep -v grep | awk '{print $2}' |xargs kill -SIGKILL");
                 break;
             case 'start':