Skip to content

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

@benweint

Description

@benweint

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
false
$ JRUBY_OPTS="" ruby -e "p Process.respond_to?(:fork)" 2>/dev/null
false

Incorrect (with profiling enabled):

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

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions