Process.respond_to?(:fork) returns true when profiling is enabled #1145

benweint opened this Issue Oct 21, 2013 · 1 comment

3 participants


With JRuby 1.7.5 (and 1.7.4, haven't checked other versions), when I enable profiling with the --profile or --profile.flat options in JRUBY_OPTS, Process.respond_to?(:fork) starts returning true (expected behavior on JRuby is for it to return false, since fork is not supported).

Correct (without profiling):

$ ruby -e "p Process.respond_to?(:fork)" 2>/dev/null
$ JRUBY_OPTS="" ruby -e "p Process.respond_to?(:fork)" 2>/dev/null

Incorrect (with profiling enabled):

$ JRUBY_OPTS="--profile" ruby -e "p Process.respond_to?(:fork)" 2>/dev/null
$ JRUBY_OPTS="--profile.flat" ruby -e "p Process.respond_to?(:fork)" 2>/dev/null

Version info:

$ ruby --version
jruby 1.7.5 (1.9.3p392) 2013-10-07 74e9291 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_21-b12 [darwin-x86_64]
$ uname -a
Darwin koan.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
@headius headius was assigned Oct 22, 2013
JRuby Team member

Closing, based on the commit message above.

@BanzaiMan BanzaiMan closed this Oct 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment