Skip to content

Commit

Permalink
Update Spinner.php
Browse files Browse the repository at this point in the history
  • Loading branch information
freost committed Oct 26, 2024
1 parent cb71104 commit b4dfa57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mako/cli/output/helpers/Spinner.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ protected function spinner(string $message, string $template): void
while (true) {
$this->output->write("\r" . sprintf($template, $this->frames[$i++ % $frames]) . " {$message}");

usleep(static::TIME_BETWEEN_REDRAW);

if (posix_kill(posix_getpid(), 0) === false) {
break;
}

if (posix_getppid() === 1) {
posix_kill(posix_getpid(), SIGKILL);
}

usleep(static::TIME_BETWEEN_REDRAW);
}
}

Expand Down

0 comments on commit b4dfa57

Please sign in to comment.