Actions
Bug #6249
closedProcess.exec doesn't restore the environment if it fails
Description
ENV["foo"]
=> nil
Process.exec({"foo" => "bar"}, "nonexistent")
Errno::ENOENT: No such file or directory - nonexistent
from (irb):2:inexec' from (irb):2 from /Users/john/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in
'
ENV["foo"]
=> "bar"
I expected that Process.exec would either use execle or execve, or (if it implements environment modification itself), to manually restore the existing environment upon failure.
Actions
Like0
Like0Like0Like0