File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -248,10 +248,12 @@ bool ArgParser::parseArgs(int argc, char *argv[]) {
248
248
// Force OpenJDK-based JVMs to use /dev/urandom for random number generation
249
249
// See https://github.com/jruby/jruby/issues/4685 among others.
250
250
struct stat buffer;
251
- if (stat (" /dev/urandom" , &buffer ) == 0 ) {
251
+ if (access (" /dev/urandom" , R_OK ) == 0 ) {
252
252
// OpenJDK tries really hard to prevent you from using urandom.
253
253
// See https://bugs.openjdk.java.net/browse/JDK-6202721
254
- javaOptions.push_back (" -Djava.security.egd=/dev/./urandom" );
254
+ // Non-file URL causes fallback to slow threaded SeedGenerator.
255
+ // See https://bz.apache.org/bugzilla/show_bug.cgi?id=56139
256
+ javaOptions.push_back (" -Djava.security.egd=file:/dev/urandom" );
255
257
}
256
258
257
259
if (getenv (" VERIFY_JRUBY" ) != NULL ) {
You can’t perform that action at this time.
0 commit comments