[#37050] [Feature #735] Date#inspect — "rubikitch ." <redmine@...>

Feature #735: Date#inspect

14 messages 2008/11/09

[#37075] [Feature #747] /\A/u ignores BOM — Shyouhei Urabe <redmine@...>

Feature #747: /\A/u ignores BOM

14 messages 2008/11/12

[#37161] m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...>

Yuguiです。

35 messages 2008/11/24
[#37183] Re: m17n of irb — keiju@... (keiju ISHITSUKA) 2008/11/25

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

[#37203] Re: m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...> 2008/11/26

keiju ISHITSUKA さんは書きました:

[#37292] Re: m17n of irb — Yukihiro Matsumoto <matz@...> 2008/12/06

まつもと ゆきひろです

[#37293] Re: m17n of irb — "Yugui (Yuki Sonoda)" <yugui@...> 2008/12/07

Yuguiです。

[#37298] Re: m17n of irb — Yukihiro Matsumoto <matz@...> 2008/12/07

まつもと ゆきひろです

[#37210] RSS::Maker.create(version) — "Akinori MUSHA" <knu@...>

 RSS::Maker で、 "2.0" 等の文字列でフィードのフォーマットを渡す

15 messages 2008/11/27

[#37213] Re: [ruby-cvs:27586] Ruby:r20368 (trunk): * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return — Tadayoshi Funaba <tadf@...>

> * ext/bigdecimal/bigdecimal.c (BigDecimal_div2): should return

8 messages 2008/11/27

[ruby-dev:37120] Re: test/webrick/test_server.rb doesn't finish

From: Nobuyoshi Nakada <nobu@...>
Date: 2008-11-18 17:56:48 UTC
List: ruby-dev #37120
なかだです。

At Wed, 19 Nov 2008 00:31:45 +0900,
shinichiro.h wrote in [ruby-dev:37117]:
> fork 前の mutex/condvar の状態が残ってるのがマズいのかなぁと
> rb_thread_create_timer_thread でスレッド作る前に
> 初期化するコードを入れてみたらなおりました。
> これが正しい処置なのかは自信がありません。

mutexやcondvarがロックされたままだとなにかリソースを掴んだままに
なる可能性がないとも言い切れないので、forkの前にタイマーを止めて
おくほうが安全かもしれません。

手元の環境では再現しないようなので確認できないのですが、以下のパッ
チではどうでしょうか。


Index: process.c
===================================================================
--- process.c	(revision 20246)
+++ process.c	(working copy)
@@ -976,4 +976,6 @@ void rb_thread_reset_timer_thread(void);
 #define after_exec() \
   (rb_thread_start_timer_thread(), rb_disable_interrupt())
+#define before_fork() before_exec()
+#define after_fork() after_exec()
 
 #include "dln.h"
@@ -2273,5 +2275,6 @@ rb_fork(int *status, int (*chfunc)(void*
     }
 #endif
-    for (; (pid = fork()) < 0; prefork()) {
+    for (; before_fork(), (pid = fork()) < 0; prefork()) {
+	after_fork();
 	switch (errno) {
 	  case EAGAIN:
@@ -2299,5 +2302,4 @@ rb_fork(int *status, int (*chfunc)(void*
     }
     if (!pid) {
-	rb_thread_reset_timer_thread();
 	if (chfunc) {
 #ifdef FD_CLOEXEC
@@ -2315,8 +2317,8 @@ rb_fork(int *status, int (*chfunc)(void*
 #endif
 	}
-	rb_thread_start_timer_thread();
     }
+    after_fork();
 #ifdef FD_CLOEXEC
-    else if (chfunc) {
+    if (pid && chfunc) {
 	close(ep[1]);
 	if ((state = read(ep[0], &err, sizeof(err))) < 0) {


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread