Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IO#close_on_exec= seems to have no effect on JDK sockets #5009

Open
headius opened this issue Jan 24, 2018 · 0 comments
Open

IO#close_on_exec= seems to have no effect on JDK sockets #5009

headius opened this issue Jan 24, 2018 · 0 comments

Comments

@headius
Copy link
Member

headius commented Jan 24, 2018

In #4858, I implemented close_on_exec logic matching MRI, but because we do not always use direct native IO streams there are lingering issues. Toward the end of that issue, I discovered that ServerSocketChannel can be unwrapped by our fileno logic, but changing the CLOEXEC bit does not appear to affect it. The fd remains available and open in an exec'ed subprocess.

This needs further investigation.

Note that the properly-unwrapped fileno from JDK socket streams can't be directly used in a subprocess, making this a bit trickier to test. See #5008.

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

No branches or pull requests

1 participant