ruby-changes:4693
From: ko1@a...
Date: Fri, 25 Apr 2008 00:57:53 +0900 (JST)
Subject: [ruby-changes:4693] akr - Ruby:r16187 (trunk): FreeBSD ash doesn't fail with echo >&4 where 4 is not opened.
akr 2008-04-25 00:57:44 +0900 (Fri, 25 Apr 2008)
New Revision: 16187
Modified files:
trunk/test/ruby/test_process.rb
Log:
FreeBSD ash doesn't fail with echo >&4 where 4 is not opened.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_process.rb?r1=16187&r2=16186&diff_format=u
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb (revision 16186)
+++ test/ruby/test_process.rb (revision 16187)
@@ -453,24 +453,21 @@
def test_execopts_close_others
with_tmpchdir {|d|
with_pipe {|r, w|
- system("exec 2>err; echo ma >&#{w.fileno}", :close_others=>true)
+ system("exec >/dev/null 2>err; echo ma >&#{w.fileno}", :close_others=>true)
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|
- Process.wait spawn("exec 2>err; echo mi >&#{w.fileno}", :close_others=>true)
+ Process.wait spawn("exec >/dev/null 2>err; echo mi >&#{w.fileno}", :close_others=>true)
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|
- Process.wait fork { exec("exec 2>err; echo mu >&#{w.fileno}", :close_others=>true) }
+ Process.wait fork { exec("exec >/dev/null 2>err; echo mu >&#{w.fileno}", :close_others=>true) }
w.close
assert_equal("", r.read)
- assert_not_equal("", File.read("err"))
File.unlink("err")
}
with_pipe {|r, w|
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/