@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | */ |
77 | 77 | final public function startup(object $server = null) : void |
78 | 78 | { |
79 | - $this->process = new SWProcess(function (SWProcess $process) { |
|
79 | + $this->process = new SWProcess(function(SWProcess $process) { |
|
80 | 80 | // set process name |
81 | 81 | if ($this->name) { |
82 | 82 | @$process->name(sprintf('[process] %s', $this->name)); |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | $this->action(Program::STOPPED); |
129 | 129 | |
130 | 130 | // waiting |
131 | - $wait->then(function () use ($sig) { |
|
131 | + $wait->then(function() use ($sig) { |
|
132 | 132 | $this->exited($sig); |
133 | - }, function (Throwable $e) use ($sig) { |
|
133 | + }, function(Throwable $e) use ($sig) { |
|
134 | 134 | $this->exited($sig, $e); |
135 | 135 | }); |
136 | 136 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | final public function bootstrap() : void |
35 | 35 | { |
36 | 36 | foreach ([SIGINT, SIGTERM] as $sig) { |
37 | - SWProcess::signal($sig, function (int $sig) { |
|
37 | + SWProcess::signal($sig, function(int $sig) { |
|
38 | 38 | $this->backend->shutdown($sig); |
39 | 39 | }); |
40 | 40 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | final public function reading() : void |
47 | 47 | { |
48 | - swoole_event_add($this->backend->process()->pipe, function () { |
|
48 | + swoole_event_add($this->backend->process()->pipe, function() { |
|
49 | 49 | $recv = $this->backend->process()->read(); |
50 | 50 | try { |
51 | 51 | list($name, $arguments) = unserialize($recv); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public static function watch(int $pid) : void |
29 | 29 | { |
30 | - self::$watched || self::$watched = SWProcess::signal(SIGCHLD, function () { |
|
30 | + self::$watched || self::$watched = SWProcess::signal(SIGCHLD, function() { |
|
31 | 31 | while ($ex = SWProcess::wait(false)) { |
32 | 32 | Progress::exited($ex['pid'], $ex['signal'], $ex['code']); |
33 | 33 | } |