|
|
@@ -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':
|