| @@ 237-242 (lines=6) @@ | ||
| 234 | // yes it is, so stop it |
|
| 235 | // send a TERM signal to the screen session |
|
| 236 | $log->addStep("send SIGTERM to process '{$pid}'", function() use ($pid) { |
|
| 237 | if ($this->getIsLocalhost()) { |
|
| 238 | posix_kill($pid, SIGTERM); |
|
| 239 | } |
|
| 240 | else { |
|
| 241 | usingHost($this->args[0])->runCommand("kill {$pid}"); |
|
| 242 | } |
|
| 243 | }); |
|
| 244 | ||
| 245 | // has this worked? |
|
| @@ 266-271 (lines=6) @@ | ||
| 263 | } |
|
| 264 | ||
| 265 | $log->addStep("send SIGKILL to process '{$pid}'", function() use($pid) { |
|
| 266 | if ($this->getIsLocalhost()) { |
|
| 267 | posix_kill($pid, SIGKILL); |
|
| 268 | } |
|
| 269 | else { |
|
| 270 | usingHost($this->args[0])->runCommand("kill -9 {$pid}"); |
|
| 271 | } |
|
| 272 | sleep(1); |
|
| 273 | }); |
|
| 274 | ||