Skip to content

Conversation

@kaigritun
Copy link

Summary

Fixes #496

When using --kill-others with --restart-tries, processes that were killed by killOthers would be incorrectly restarted. This happened because RestartProcess was unaware that the abort signal had been triggered.

Changes

  • Pass the abort signal to RestartProcess
  • Use takeUntil(abort$) to stop all restart attempts once abort is signaled
  • Added test to verify the behavior

Testing

All existing tests pass, plus a new test that verifies:

  1. First failure triggers a restart (as expected)
  2. After abort signal, subsequent failures do NOT trigger restarts

This is a minimal, targeted fix that follows the maintainer's suggestion in #496 to use takeUntil operator.

When using --kill-others with --restart-tries, processes that were killed
by killOthers would be incorrectly restarted. This happened because
RestartProcess was unaware that the abort signal had been triggered.

This fix passes the abort signal to RestartProcess, which uses takeUntil
to stop all restart attempts once abort is signaled.

Fixes open-cli-tools#496
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

killOthers won't fully terminate others if also restartTries >= 1

1 participant