| @@ 136-141 (lines=6) @@ | ||
| 133 | // yes it is, so stop it |
|
| 134 | // send a TERM signal to the screen session |
|
| 135 | $log->addStep("send SIGTERM to process '{$pid}'", function() use ($pid) { |
|
| 136 | if ($this->getIsLocalhost()) { |
|
| 137 | posix_kill($pid, SIGTERM); |
|
| 138 | } |
|
| 139 | else { |
|
| 140 | usingHost($this->args[0])->runCommand("kill {$pid}"); |
|
| 141 | } |
|
| 142 | }); |
|
| 143 | ||
| 144 | // has this worked? |
|
| @@ 165-170 (lines=6) @@ | ||
| 162 | } |
|
| 163 | ||
| 164 | $log->addStep("send SIGKILL to process '{$pid}'", function() use($pid) { |
|
| 165 | if ($this->getIsLocalhost()) { |
|
| 166 | posix_kill($pid, SIGKILL); |
|
| 167 | } |
|
| 168 | else { |
|
| 169 | usingHost($this->args[0])->runCommand("kill -9 {$pid}"); |
|
| 170 | } |
|
| 171 | sleep(1); |
|
| 172 | }); |
|
| 173 | ||