[#40961] [Bug #3137] complex.rb changes exceptions of Math — Yusuke Endoh <redmine@...>

Bug #3137: complex.rb changes exceptions of Math

15 messages 2010/04/12
[#40967] Re: [Bug #3137] complex.rb changes exceptions of Math — keiju@... (石塚圭樹) 2010/04/13

けいじゅ@いしつかです.

[#41038] Windows と DL が使用条件の libffi — Aaron Patterson <aaron.patterson@...>

こんにちは!アーロンです。

17 messages 2010/04/22
[#41039] Re: Windows と DL が使用条件の libffi — "U.Nakamura" <usa@...> 2010/04/22

こんにちは、なかむら(う)です。

[#41040] Re: Windows と DL が使用条件の libffi — "NARUSE, Yui" <naruse@...> 2010/04/22

成瀬です。

[#41059] Re: Windows と DL が使用条件の libffi — Aaron Patterson <aaron.patterson@...> 2010/04/26

2010/4/21 NARUSE, Yui <[email protected]>:

[#41060] Re: Windows と DL が使用条件の libffi — Yugui <yugui@...> 2010/04/26

2010/4/26 Aaron Patterson <[email protected]>:

[#41067] [Feature #3203] LazySweepGC patch — Narihiro Nakamura <redmine@...>

Feature #3203: LazySweepGC patch

15 messages 2010/04/26
[#41069] Re: [Feature #3203] LazySweepGC patch — Yusuke ENDOH <mame@...> 2010/04/27

遠藤です。

[#41104] Rails3 M17N — Yukihiro Matsumoto <matz@...>

まつもと ゆきひろです

29 messages 2010/04/30
[#41111] Re: Rails3 M17N — Urabe Shyouhei <shyouhei@...> 2010/04/30

Yukihiro Matsumoto =E3=81=95=E3=82=93=E3=81=AF=E6=9B=B8=E3=81=8D=E3=81=BE=

[#41113] Re: Rails3 M17N — Yukihiro Matsumoto <matz@...> 2010/04/30

まつもと ゆきひろです

[ruby-dev:41054] [Bug #3198] O_APPEND for redirect fd is ignored on windows

From: _ wanabe <redmine@...>
Date: 2010-04-25 03:35:54 UTC
List: ruby-dev #41054
Bug #3198: O_APPEND for redirect fd is ignored on windows
http://redmine.ruby-lang.org/issues/show/3198

起票者: _ wanabe
ステータス: Open, 優先度: Normal
ruby -v: ruby 1.9.2dev (2010-04-24 trunk 22784) [i386-mingw32]

Windows7 で、リダイレクト用にファイルをオープンする時
O_APPEND を渡しても無視されます。

$ cat test.rb
fname = "tmp.out"
File.delete fname if File.exist? fname
5.times do
  system("echo a", STDOUT=>[fname, File::WRONLY|File::CREAT|File::APPEND, 0644])
end
p IO.read(fname)

$ ruby -v test.rb
ruby 1.9.2dev (2010-04-24 trunk 22784) [i386-mingw32]
"a\n"

以下のようなパッチを書きました。特に反対がなければコミットさせて頂きます。
rb_w32_open で処理することも考えましたが、おそらくリダイレクト以外では
O_APPEND が効くのではないかと思うので、とりあえず process.c で処理しました。

Index: process.c
===================================================================
--- process.c (revision 27483)
+++ process.c (working copy)
@@ -2094,6 +2094,11 @@ run_exec_open(VALUE ary, VALUE save, char *errmsg, size_t errmsg_buflen)
             ERRMSG("open");
             return -1;
         }
+#if defined(_WIN32)
+	if (flags & O_APPEND) {
+	    lseek(fd2, 0, SEEK_END);
+	}
+#endif
         while (i < RARRAY_LEN(ary) &&
                (elt = RARRAY_PTR(ary)[i], RARRAY_PTR(elt)[1] == param)) {
             fd = FIX2INT(RARRAY_PTR(elt)[0]);


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next