Skip to content

Fix task cancellation stopping the worker on macOS - #1173

Open
masakiaota wants to merge 1 commit into
It4innovations:mainfrom
masakiaota:macos-task-process-group
Open

masakiaota wants to merge 1 commit into
It4innovations:mainfrom
masakiaota:macos-task-process-group

Conversation

@masakiaota

Copy link
Copy Markdown

Fixes #1171

setsid() was inside the cfg(target_os = "linux") block together with prctl, so on macOS the task stayed in the worker's process group. Cancelling a task sent killpg to the worker too.

This calls setsid() on all Unix targets and keeps only prctl(PR_SET_PDEATHSIG) Linux-specific. Nothing changes on Linux.

Tested on macOS (arm64) with the reproduction from the issue: the worker stays alive after hq job cancel 1 and job 2 finishes.

This branch has not been deployed

No deployments
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.

hq job cancel stops the worker on macOS

1 participant