Skip to content

fix: stop a running command at once when the instance is dropped - #10

Merged
bddkit merged 1 commit into
bddkit:mainfrom
sergeym:fix/issue-1-immediate-stop
Oct 16, 2026
Merged

bddkit merged 1 commit into
bddkit:mainfrom
sergeym:fix/issue-1-immediate-stop

Conversation

@sergeym

@sergeym sergeym commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #1.

bddkit_drop_instance waited for the instance lock, which a dispatch holds for its whole run. Live process trees now sit in a registry outside the lock: the drop asks every tree to stop first, the step in flight kills its tree when the remaining stop_grace_secs runs out and fails with "the run was interrupted", and the later reset spends only the grace that is left. No ABI change; behaviour without an interrupt is unchanged.

Verified: unit, in-process export test (drop mid-sleep 30 returns within the grace) and e2e against bddkit 0.3.0 all green; clippy clean; Windows target compile-checked only.

…kit#1)

drop_instance used to wait for the instance lock, which a dispatch holds for
its whole run. A registry of live process trees now sits outside the lock:
the drop asks every tree to stop first, and the step in flight escalates to
a kill when what is left of the grace runs out.
@sergeym
sergeym force-pushed the fix/issue-1-immediate-stop branch from 3adf964 to 028771f Compare October 16, 2026 20:52
@bddkit
bddkit merged commit e14b9b1 into bddkit:main Oct 16, 2026
6 checks passed
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.

Act on an interrupted run immediately, even while a command is running

2 participants