Skip to content

Commit f10a548

Browse files
committed
Only define process constants that are there
1 parent b15fdf1 commit f10a548

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/main/ruby/truffleruby/core/process.rb

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,13 @@ module Constants
5555
RLIMIT_NOFILE = Truffle::Config['platform.process.RLIMIT_NOFILE']
5656
RLIMIT_STACK = Truffle::Config['platform.process.RLIMIT_STACK']
5757

58-
%i[RLIMIT_MEMLOCK RLIMIT_NPROC RLIMIT_RSS RLIMIT_SBSIZE].each do |limit|
58+
%i[RLIMIT_MEMLOCK RLIMIT_NPROC RLIMIT_RSS RLIMIT_SBSIZE RLIMIT_RTPRIO
59+
RLIMIT_RTTIME RLIMIT_SIGPENDING RLIMIT_MSGQUEUE RLIMIT_NICE].each do |limit|
5960
if value = Truffle::Config.lookup("platform.process.#{limit}")
6061
const_set limit, value
6162
end
6263
end
6364

64-
if Truffle::Config.lookup('platform.process.RLIMIT_RTPRIO')
65-
RLIMIT_RTPRIO = Truffle::Config['platform.process.RLIMIT_RTPRIO']
66-
RLIMIT_RTTIME = Truffle::Config['platform.process.RLIMIT_RTTIME']
67-
RLIMIT_SIGPENDING = Truffle::Config['platform.process.RLIMIT_SIGPENDING']
68-
RLIMIT_MSGQUEUE = Truffle::Config['platform.process.RLIMIT_MSGQUEUE']
69-
RLIMIT_NICE = Truffle::Config['platform.process.RLIMIT_NICE']
70-
end
71-
7265
WNOHANG = Truffle::Config['platform.process.WNOHANG']
7366
WUNTRACED = Truffle::Config['platform.process.WUNTRACED']
7467
end

0 commit comments

Comments
 (0)