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

casret opened this Issue Jan 6, 2012 · 1 comment


None yet
2 participants

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 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