Skip to content

Conversation

Alizter
Copy link
Collaborator

@Alizter Alizter commented Aug 30, 2025

We add a way of tracking whether a job is a process group leader to the
scheduler. This allows us to avoid sending a signal to a process group
when it isn't needed.

Doing so fixes an issue with dune exec -w where rebuilds would send a
kill signal to a non-existant process group assumed to be attached to
the process we were execing.

@Alizter Alizter force-pushed the dune-exec-watch-server branch 2 times, most recently from 7f1ffff to e61a2dd Compare August 30, 2025 19:49
@Alizter Alizter force-pushed the dune-exec-watch-server branch from e61a2dd to de9aff5 Compare August 30, 2025 23:58
@rgrinberg
Copy link
Member

I don't think we should have any "fallbacks". If we are launching a process without a process group, we know we are doing that and there's no need to send a signal to the group

@Alizter
Copy link
Collaborator Author

Alizter commented Aug 31, 2025

Sounds good to me. I will need to design a more principled solution that tracks the process group as you said. It might take some time before I can get round to it however.

@maiste maiste added this to the 3.21 milestone Sep 1, 2025
@Alizter Alizter force-pushed the dune-exec-watch-server branch from de9aff5 to 00984fe Compare September 1, 2025 17:55
@Alizter Alizter changed the title fix(exec-w): fallback to killing pid when pgid isn't available fix: avoid killing process group when not applicable Sep 1, 2025
@Alizter
Copy link
Collaborator Author

Alizter commented Sep 1, 2025

💥 I've messed up killall on Windows, the CI will not finished.

We add a way of tracking whether a job is a process group leader to the
scheduler. This allows us to avoid sending a signal to a process group
when it isn't needed.

Doing so fixes an issue with dune exec -w where rebuilds would send a
kill signal to a non-existant process group assumed to be attached to
the process we were execing.

Signed-off-by: Ali Caglayan <[email protected]>
@Alizter Alizter force-pushed the dune-exec-watch-server branch from 00984fe to ca5f086 Compare September 15, 2025 23:53
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.

dune exec --watch broken for long-running processes
3 participants