Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion core/src/main/java/org/jruby/util/io/PopenExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,9 @@ static void execargParentStart1(ThreadContext context, ExecArg eargp) {
} else {
// In MRI, they use the current env as the baseline because they fork+exec. We can't do that,
// and posix_spawn needs a full env, so we pass even unmodified env through.
// Copy it like MRI's rb_env_to_hash: another thread may change ENV while we build envp.
envtbl = objectClass(context).getConstant(context, "ENV");
envtbl = TypeConverter.convertToType(envtbl, hashClass(context), "to_hash");
envtbl = TypeConverter.convertToType(envtbl, hashClass(context), "to_hash").dup();
}
buildEnvp(context, eargp, (RubyHash) envtbl);
// RB_GC_GUARD(execarg_obj);
Expand Down
Loading