ruby-changes:14914
From: nobu <ko1@a...>
Date: Sun, 28 Feb 2010 15:12:53 +0900 (JST)
Subject: [ruby-changes:14914] Ruby:r26784 (ruby_1_8): * lib/open3.rb (Open3#popen3): ignore trap and at_exit also when
nobu 2010-02-28 15:12:40 +0900 (Sun, 28 Feb 2010) New Revision: 26784 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26784 Log: * lib/open3.rb (Open3#popen3): ignore trap and at_exit also when exec failed. [ruby-dev:30181] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/lib/open3.rb Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 26783) +++ ruby_1_8/ChangeLog (revision 26784) @@ -1,5 +1,8 @@ -Sun Feb 28 15:11:07 2010 Nobuyoshi Nakada <nobu@r...> +Sun Feb 28 15:12:37 2010 Nobuyoshi Nakada <nobu@r...> + * lib/open3.rb (Open3#popen3): ignore trap and at_exit also when + exec failed. [ruby-dev:30181] + * lib/open3.rb (Open3#popen3): use Thread.detach instead of double-fork, so that the exit status can be obtained. Index: ruby_1_8/lib/open3.rb =================================================================== --- ruby_1_8/lib/open3.rb (revision 26783) +++ ruby_1_8/lib/open3.rb (revision 26784) @@ -68,6 +68,9 @@ STDERR.reopen(pe[1]) pe[1].close + trap("EXIT", "DEFAULT") + at_exit {exit!(false)} + at_exit {raise($!)} exec(*cmd) } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/