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

Make the check for the availability of fork() more precise #1630

Merged
merged 1 commit into from Sep 11, 2018

Conversation

eregon
Copy link
Contributor

@eregon eregon commented Aug 9, 2018

So that it also triggers for TruffleRuby which currently doesn't support fork.

Methods can have respond_to? => false if they are "unimplemented"/"not supported on this platform", but yet be actually defined and be part of Module#methods.
Those methods usually just raise a NotImplementedError like
fork is not available (NotImplementedError).
This is what MRI does and it's also supported in at least JRuby, Rubinius and TruffleRuby.

The error message is made generic and now looks like this:

# For TruffleRuby
ERROR: worker mode not supported on truffleruby on this platform
# For JRuby
ERROR: worker mode not supported on jruby on this platform

Related: I wonder, why does the cluster mode of Puma needs fork and not just spawn?

@eregon
Copy link
Contributor Author

eregon commented Aug 9, 2018

The CI fails, but it seems unrelated to this change and it already fails on master.

@eregon
Copy link
Contributor Author

eregon commented Sep 11, 2018

Could someone review this PR?
cc @evanphx @schneems @luislavena @nateberkopec

@schneems
Copy link
Contributor

Thanks!

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.

None yet

2 participants