-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
spawn+Process.wait2 sometimes raises ECHILD (on OSX) #3274
Comments
This is happened for me on both 1.7.20.1 and 1.7.22. (Running OS X 10.10.5 FWIW) Fortunately, I don't see it with my repro case with JRuby 9.0.0.0. ✨ |
This is a problem due to our using the JDK process APIs. All processes started via
It's this last step that interferes with use of As documented in the man page:
The "unwaited-for" bit is what I'm talking about here. It works on 9k because 9k reimplemented process spawning entirely using native calls, so the pid you get back is not touched by any other threads. This also fixes many issues with inherited streams, redirected streams, and so on. Unfortunately the 9k logic is extensive and we probably will not be backporting it into the 9k codebase, so I'm going to close this as fixed in 9.0.0.0. |
FWIW, a blog post I wrote about this JDK problem a few years ago: http://blog.headius.com/2013/06/the-pain-of-broken-subprocess.html |
Great material for a Halloween horror story, where ECHILD popping up out of (Oversimplifying a POSIX layer will always force the rest of the world to Answers a ton of questions - thanks for what you do.
|
Example overview (from guard/guard-rspec#341):
spawn
to run RSpec with parameters (returns pid)Process.wait2(pid)
-> raisesErrno::ECHILD
Expected: shouldn't raise Errno::ECHILD
Actual:
JRuby versions:
Notes
The text was updated successfully, but these errors were encountered: