Hi, in core/process/constants_spec.rb there are a few tests which explicitly test the values of the RLIMIT_* constants. These will fail on platforms which use different values for these constants. Example test failure on SPARC:
1)
Process::Constants has the correct constant values on Linux FAILED
Expected 7 == 6
to be truthy but was false
/var/tmp/portage/dev-lang/ruby-3.2.3/work/ruby-3.2.3/spec/ruby/core/process/constants_spec.rb:45:in `block (3 levels) in <top (required)>'
/var/tmp/portage/dev-lang/ruby-3.2.3/work/ruby-3.2.3/spec/ruby/core/process/constants_spec.rb:3:in `<top (required)>'
At a quick glance, both Alpha and MIPS are also affected by this specifically for RLIMIT_NPROC, but other architectures may be affected for other resource constants.
Hi, in
core/process/constants_spec.rb
there are a few tests which explicitly test the values of theRLIMIT_*
constants. These will fail on platforms which use different values for these constants. Example test failure on SPARC:The default value is indeed
6
: https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/resource.h#L26-L28But this can be overridden on a per-architecture basis, e.g. SPARC overrides it to
7
: https://github.com/torvalds/linux/blob/master/arch/sparc/include/uapi/asm/resource.h#L11-L16At a quick glance, both Alpha and MIPS are also affected by this specifically for
RLIMIT_NPROC
, but other architectures may be affected for other resource constants.