Skip to content

fix(exec): Spawn dune exec processes in inherited process group#11876

Merged
Alizter merged 3 commits intoocaml:mainfrom
Alizter:dune-exec-pager
Jun 4, 2025
Merged

fix(exec): Spawn dune exec processes in inherited process group#11876
Alizter merged 3 commits intoocaml:mainfrom
Alizter:dune-exec-pager

Conversation

@Alizter
Copy link
Copy Markdown
Collaborator

@Alizter Alizter commented May 31, 2025

In dune 3.18 we invoked Spawn directly to start a process and in turn we defaulted to inheriting the process group. In 3.19 this was changed to use the process managment given by Dune_engine.Process however here we always spawn processes in a new process group.

Terminal sessions typically rely on the process group when doing interactive things like reading lines from the user. This meant we ran into issues such as #11870 and #11867.

The fix here is to revert back to inheriting the process group.

In dune 3.18 we invoked Spawn directly to start a process and in turn we
defaulted to inheriting the process group. In 3.19 this was changed to
use the process managment given by Dune_engine.Process however there we
always spawn processes in a new process group.

Terminal sessions typically rely on the process group when doing
interactive things like reading lines from the user. This meant we ran
into issues such as ocaml#11870 and ocaml#11867.

The fix here is to revert back to inheriting the process group.

Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter force-pushed the dune-exec-pager branch from 6504cd2 to 120e8ac Compare June 2, 2025 22:34
Signed-off-by: Ali Caglayan <alizter@gmail.com>
@Alizter Alizter enabled auto-merge June 4, 2025 08:50
@Alizter Alizter merged commit fc8bc89 into ocaml:main Jun 4, 2025
1 check passed
@Alizter Alizter deleted the dune-exec-pager branch June 4, 2025 08:50
@Alizter Alizter mentioned this pull request Jun 4, 2025
5 tasks
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.

Fails to pass input to program via stdin when launching program with "dune exec" dune exec seems to be hanging with 3.19

2 participants