Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

If `options.env` is not provided, do not replace the child's environ #612

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

AvianFlu commented Nov 2, 2012

Currently, setting options.env to NULL for uv_spawn results in a child process for whom environ == NULL. This can cause a wide variety of unexpected issues - this patch is a simple fix, and a test for the issue.

AvianFlu added some commits Nov 1, 2012

unix: do not set environ unless one is provided
Currently, `uv_spawn` will set `environ` to the value of `options.env`, even if
`options.env` is `NULL`.  This results in child processes for whom `environ ==
NULL`, which can cause a variety of unexpected issues.
unix: test: Add test for child process env vars
Test if the env is preserved when `options.env` is explicitly set to NULL.
Contributor

bnoordhuis commented Nov 3, 2012

Thanks Charlie, landed in 1d85815.

@bnoordhuis bnoordhuis closed this Nov 3, 2012

Contributor

bnoordhuis commented Nov 3, 2012

And in fb64948 in v0.8.

Member

piscisaureus commented Nov 5, 2012

You broke the windows build guys. Well done!

Contributor

bnoordhuis commented Nov 5, 2012

Why? setenv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment