Skip to content

Enable recursive fd redirection for popen logic.#5898

Merged
headius merged 1 commit intojruby:masterfrom
headius:popen_recursive_redirect
Oct 27, 2019
Merged

Enable recursive fd redirection for popen logic.#5898
headius merged 1 commit intojruby:masterfrom
headius:popen_recursive_redirect

Conversation

@headius
Copy link
Member

@headius headius commented Sep 30, 2019

See #5865

The logic here was disabled because it makes changes to file descriptors in the parent process, which could cause a race if multiple threads try to popen using the same descriptors. However the race only affects subprocess launching and the mostly-inert CLOEXEC descriptor flag, so I think any possible problems can be mitigated easily.

Note we also are not consistent about setting CLOEXEC right now anyway, owing to the JVM's hiding of many descriptors. CLOEXEC cleanup and serializing these changes in popen can come later (if they're needed).

@headius headius added this to the JRuby 9.2.9.0 milestone Sep 30, 2019
@headius headius merged commit a81ab18 into jruby:master Oct 27, 2019
@headius headius deleted the popen_recursive_redirect branch October 27, 2019 08:20
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.

1 participant