Skip to content

test(engine): cover concurrent process redirections - #16254

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-ttlvnuslzzqs
Aug 29, 2026
Merged

rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-ttlvnuslzzqs

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

Add a regression demonstrating that concurrent process actions beneath one
stdout redirection share and close a single-use Process.Io value. One child's
output reaches the target while the other escapes to Dune's own output.

This intentionally records the current faulty behavior so a follow-up fix can
update the snapshot.

Run two processes concurrently below one stdout redirection and snapshot both
possible destinations. Output split between the target and Dune demonstrates
that the children share and close a single-use Process.Io value.

Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg
rgrinberg merged commit 144fa2c into ocaml:main Aug 29, 2026
37 of 39 checks passed
rgrinberg added a commit that referenced this pull request Aug 29, 2026
Concurrent children inherited the same single-use `Process.Io` values.
The
first process spawn could close a redirected descriptor before its
siblings
used it, causing their output to escape the redirection.

Give each child a multi-use view while leaving ownership with the
enclosing
action. The regression added in #16254 now records both lines in the
target and
no escaped output.
@Alizter Alizter added this to the 3.25.0 milestone Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants