Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattCast44 committed Jul 24, 2022
1 parent 1a2338d commit 7dcf40c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,11 @@ private function initProcess(): Process
return $process;
}

public function start(): self
public function start(callable $callback = null): int
{
$this->process = $this->initProcess();

while ($this->process->isRunning()) {
continue;
}

return $this;
return $this->process->wait();
}

public function runInBackground(): self
Expand All @@ -229,6 +225,8 @@ public function stop(): array|null

$this->process->stop(1);

$this->running = false;

return [
$this->process->getExitCode(),
$this->process->getExitCodeText(),
Expand Down

0 comments on commit 7dcf40c

Please sign in to comment.