aboutsummaryrefslogtreecommitdiffstats
path: root/community/jruby/jruby
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2018-06-24 22:26:35 +0200
committerJakub Jirutka <jakub@jirutka.cz>2018-06-24 22:44:42 +0200
commit2cc30828fcc60a3ca0df78c32058ebef4c6f1720 (patch)
tree461ff7bdf7e5e1d4fd38406f9285a208fc0c66de /community/jruby/jruby
parentb001493fa3056e9e139e51c0fe4eab400d9a928b (diff)
community/jruby: update jruby sh script to follow upstream's jruby.bash
Diffstat (limited to 'community/jruby/jruby')
-rw-r--r--community/jruby/jruby13
1 files changed, 12 insertions, 1 deletions
diff --git a/community/jruby/jruby b/community/jruby/jruby
index aa404beb368..f5a86d89365 100644
--- a/community/jruby/jruby
+++ b/community/jruby/jruby
@@ -3,7 +3,7 @@
#
# This jruby start script is rewrite of (poor) upstream's jruby.bash.
# It's POSIX compatible, more clean, with sensible defaults for Alpine Linux
-# and without Windows, OS X and Truffle stuff. Beside that it should support
+# and without Windows and OS X stuff. Beside that it should support
# all the options of jruby.bash (hopefully) with the same behaviour.
#
# -----BEGIN HELP-----
@@ -68,6 +68,13 @@ if [ -z "$classpath" ]; then
classpath="${classpath%?}" # %? removes leading ":"
fi
+java_security_egd=''
+if [ -r /dev/urandom ]; then
+ # Non-file URL causes fallback to slow threaded SeedGenerator.
+ # See https://bz.apache.org/bugzilla/show_bug.cgi?id=56139
+ java_security_egd='file:/dev/urandom'
+fi
+
extra_cp="${CLASSPATH:-}"
java_vm="${JAVA_VM:-"-server"}"
main_class="$MAIN_CLASS_JRUBY"
@@ -95,6 +102,9 @@ while [ $# -gt 0 ]; do
verify_jruby='yes'
java_opts="$java_opts ${1:2}"
;;
+ -J-Djava.security.egd=)
+ java_security_egd="${1#-J-Djava.security.egd=}"
+ ;;
-J*)
java_opts="$java_opts ${1:2}"
;;
@@ -194,6 +204,7 @@ done
classpath="$classpath${extra_cp:+":$extra_cp"}"
java_opts="$java_opts $java_vm
+ ${java_security_egd:+"-Djava.security.egd=$java_security_egd"}
-Djruby.home=$JRUBY_HOME
-Djruby.lib=$JRUBY_HOME/lib
-Djruby.script=jruby