Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsetenv_others => true should not need a environment to work #23

Open
casret opened this issue Jan 6, 2012 · 1 comment
Open

unsetenv_others => true should not need a environment to work #23

casret opened this issue Jan 6, 2012 · 1 comment

Comments

@casret
Copy link

casret commented Jan 6, 2012

On 1.9:
spawn('env', :unsetenv_others => true)
will unset all the environment variables.

Posix::Spawn::spawn('env', :unsetenv_others => true} does not unset all the variables. Looking at the C, you only test for the variable if an ENV is passed in. I'm not savvy enough to provide a patch. As a workaround you can pass in a hash with a dummy key (an empty hash also does not clear the environment, which should probably be another test case.)

@rtomayko
Copy link
Owner

rtomayko commented Jan 7, 2012

Thanks for the report. Should be a pretty simple fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants