Skip to content

Commit 6d08c2f

Browse files
etiennebarriebyroot
andcommitted
env
Co-authored-by: Jean Boussier <[email protected]>
1 parent 5894cc6 commit 6d08c2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

process.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4634,7 +4634,11 @@ rb_posix_spawn(struct rb_execarg *eargp)
46344634
}
46354635

46364636
char **argv = ARGVSTR2ARGV(eargp->invoke.cmd.argv_str);
4637-
pid = posix_spawn(&pid, abspath, NULL, NULL, argv, NULL);
4637+
4638+
VALUE envp_str = eargp->envp_str;
4639+
char **envp = RTEST(envp_str) ? RB_IMEMO_TMPBUF_PTR(envp_str) : NULL;
4640+
4641+
pid = posix_spawn(&pid, abspath, NULL, NULL, argv, envp);
46384642

46394643
return (rb_pid_t)pid;
46404644
}

0 commit comments

Comments
 (0)