From: Tanaka Akira Date: 2012-04-04T18:14:16+09:00 Subject: [ruby-core:44123] Re: [ruby-trunk - Bug #6249][Open] Process.exec doesn't restore the environment if it fails 2012/4/3 john_firebaugh (John Firebaugh) : >>> ENV["foo"] > => nil >>> Process.exec({"foo" => "bar"}, "nonexistent") > Errno::ENOENT: No such file or directory - nonexistent > from (irb):2:in `exec' > 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. I see. I think Process.exec should use execve. -- Tanaka Akira