Skip to content

Commit cfc0948

Browse files
committed
Launcher should honor JAVA_STACK as well
1 parent 1296f4b commit cfc0948

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

argparser.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
235235
javaOptions.push_back(java_mem);
236236
}
237237

238+
const char *java_stack = getenv("JAVA_STACK");
239+
if (java_stack != NULL) {
240+
javaOptions.push_back(java_stack);
241+
}
242+
238243
addToArgList(args, argc, argv);
239244

240245
logMsg("Parsing arguments:");

spec/launcher_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@
203203
end
204204
end
205205

206+
it "should honor JAVA_STACK" do
207+
with_environment "JAVA_STACK" => "-Xss2048k" do
208+
jruby_launcher_args("").should include("-Xss2048k", "-Djruby.stack.max=2048k")
209+
end
210+
end
211+
206212
it "should print the version" do
207213
jruby_launcher("-Xversion 2>&1").should =~ /Launcher Version [0-9.]+/
208214
end

0 commit comments

Comments
 (0)