Skip to content

jobs: fix race on cancellation

Ghost User requested to merge fix-job-term into master

The job is cancelled, then Stop().

Because Start() reads j.done after the cancellation Stop() cannot read j.done later and will send SIGKILL after the timeout.

Stop() should see right away that the job is done and exit without waiting for the timeout.

Merge request reports

Loading