From: "mame (Yusuke Endoh)" Date: 2012-04-10T14:38:49+09:00 Subject: [ruby-core:44250] [ruby-trunk - Bug #6249][Assigned] Process.exec doesn't restore the environment if it fails Issue #6249 has been updated by mame (Yusuke Endoh). Status changed from Open to Assigned Assignee set to akr (Akira Tanaka) ---------------------------------------- Bug #6249: Process.exec doesn't restore the environment if it fails https://bugs.ruby-lang.org/issues/6249#change-25780 Author: john_firebaugh (John Firebaugh) Status: Assigned Priority: Normal Assignee: akr (Akira Tanaka) Category: Target version: ruby -v: ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.3.0] >> 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. -- http://bugs.ruby-lang.org/