[#26664] refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

22 messages 2005/08/01
[#26665] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26668] Re: refactoring tcltklib.c (deleted ip check) — Hidetoshi NAGAI <nagai@...> 2005/08/01

永井@知能.九工大です.

[#26678] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26684] Re: refactoring tcltklib.c (deleted ip check) — Hidetoshi NAGAI <nagai@...> 2005/08/01

永井@知能.九工大です.

[#26686] Re: refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/01

山本です。

[#26817] test/socket/test_tcp.rb freeze on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

12 messages 2005/08/18

[#26829] cannot check EOF of pipe on windows — "U.Nakamura" <usa@...>

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

19 messages 2005/08/19
[#26830] Re: cannot check EOF of pipe on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/19

山本です。

[#26831] Re: cannot check EOF of pipe on windows — "U.Nakamura" <usa@...> 2005/08/19

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

[#26832] Re: cannot check EOF of pipe on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/19

山本です。

[#26836] Re: cannot check EOF of pipe on windows — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/19

なかだです。

[#26872] irb -I/ruby -Iと$LOAD_PATH — akira yamada / やまだあきら <akira@...>

Debianユーザからruby -Iとirb -Iで

17 messages 2005/08/24
[#26873] Re: irb -I/ruby -Iと$LOAD_PATH — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/24

なかだです。

[#26875] Re: irb -I/ruby -Iと$LOAD_PATH — akira yamada / やまだあきら <akira@...> 2005/08/24

nobuyoshi nakada wrote:

[#26885] Re: irb -I/ruby -Iと$LOAD_PATH — keiju@... (石塚圭樹) 2005/08/26

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

[#26897] fail on make install — KIMURA Koichi <kimura.koichi@...>

木村です。

28 messages 2005/08/29
[#26898] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/29

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

[#26903] Re: fail on make install — KIMURA Koichi <kbk@...> 2005/08/29

木村です。

[#26922] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/30

木村です。

[#26926] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/31

木村です。

[#26927] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/31

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

[#26928] Re: fail on make install — KIMURA Koichi <kimura.koichi@...> 2005/08/31

木村です。

[#26929] Re: fail on make install — "U.Nakamura" <usa@...> 2005/08/31

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

[#26930] Re: fail on make install — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/08/31

なかだです。

[#26931] Re: fail on make install — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/08/31

山本です。

[#26933] Re: fail on make install — nobu@... 2005/08/31

なかだです。

[#26938] Re: fail on make install — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/09/01

なかだです。

[#26939] Re: fail on make install — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/09/01

山本です。

[#26900] multiplying empty string — nobuyoshi nakada <nobuyoshi.nakada@...>

19 messages 2005/08/29
[#26904] Re: multiplying empty string — Yukihiro Matsumoto <matz@...> 2005/08/29

まつもと ゆきひろです

[#26907] Re: multiplying empty string — Tanaka Akira <akr@...17n.org> 2005/08/29

In article <1125327516.070646.12845.nullmailer@x31.priv.netlab.jp>,

[#26909] Re: multiplying empty string — Yukihiro Matsumoto <matz@...> 2005/08/29

まつもと ゆきひろです

[ruby-dev:26930] Re: fail on make install

From: nobuyoshi nakada <nobuyoshi.nakada@...>
Date: 2005-08-31 07:37:23 UTC
List: ruby-dev #26930
なかだです。

At Wed, 31 Aug 2005 14:32:42 +0900,
U.Nakamura wrote in [ruby-dev:26929]:
> | で、ip->prev = curr_thread->anchor のところで curr_thread が NULLなので
> | こけてます。ここを、curr_thread が NULL のときはスキップするようにすると
> | 
> | > むむ。"cross-thread violation on rb_gc()" ですかね?
> | 
> | で落ちるようになります。
> | 
> | 情報になれば。
> 
> どうもありがとうございます。
> 思ってたのの一つ手前でひっかかっちゃってましたか。

例外を捉えるのはrb_glob()に任せて、rb_glob2()はfuncが0以外を返
したら中断するという風に分けて、cmdglob()では例外を出さないとい
うことにしたらどうでしょうか。rb_glob2()の名前は変えたほうがい
いかもしれませんが。

> ruby_thid に初期値を入れといてチェックすればいいか、とか一瞬
> 思ったんですが、そもそも ruby_init() の前にGCが走っちゃ駄目か。
> 確かに根が深そうです。

dont_gcの初期値をtrueにしておいて、Init_heap()あたりでクリアす
るとか。


Index: dir.c
===================================================================
RCS file: /cvs/ruby/src/ruby/dir.c,v
retrieving revision 1.143
diff -U2 -p -r1.143 dir.c
--- dir.c	30 Aug 2005 14:49:51 -0000	1.143
+++ dir.c	31 Aug 2005 07:03:26 -0000
@@ -1151,38 +1151,5 @@ enum answer { YES, NO, UNKNOWN };
 #endif
 
-struct glob_args {
-    void (*func) _((const char *, VALUE));
-    const char *c;
-    VALUE v;
-};
-
-static VALUE glob_func_caller _((VALUE));
-
-static VALUE
-glob_func_caller(val)
-    VALUE val;
-{
-    struct glob_args *args = (struct glob_args *)val;
-
-    (*args->func)(args->c, args->v);
-    return Qnil;
-}
-
-static int
-glob_call_func(func, path, arg)
-    void (*func) _((const char *, VALUE));
-    const char *path;
-    VALUE arg;
-{
-    int status;
-    struct glob_args args;
-
-    args.func = func;
-    args.c = path;
-    args.v = arg;
-
-    rb_protect(glob_func_caller, (VALUE)&args, &status);
-    return status;
-}
+#define glob_call_func(func, path, arg) (*func)(path, arg)
 
 static int
@@ -1195,5 +1162,5 @@ glob_helper(path, dirsep, exist, isdir, 
     struct glob_pattern **end;
     int flags;
-    void (*func) _((const char *, VALUE));
+    int (*func) _((const char *, VALUE));
     VALUE arg;
 {
@@ -1346,9 +1313,9 @@ glob_helper(path, dirsep, exist, isdir, 
 }
 
-static int
+int
 rb_glob2(path, flags, func, arg)
     const char *path;
     int flags;
-    void (*func) _((const char *, VALUE));
+    int (*func) _((const char *, VALUE));
     VALUE arg;
 {
@@ -1389,14 +1356,30 @@ struct rb_glob_args {
     void (*func) _((const char*, VALUE));
     VALUE arg;
+    const char *path;
 };
 
+static VALUE glob_func_caller _((VALUE));
+
 static VALUE
+glob_func_caller(val)
+    VALUE val;
+{
+    struct rb_glob_args *args = (struct rb_glob_args *)val;
+
+    (*args->func)(args->path, args->arg);
+    return Qnil;
+}
+
+static int
 rb_glob_caller(path, a)
     const char *path;
     VALUE a;
 {
+    int status;
     struct rb_glob_args *args = (struct rb_glob_args *)a;
-    (*args->func)(path, args->arg);
-    return Qnil;
+
+    args->path = path;
+    rb_protect(glob_func_caller, (VALUE)&args, &status);
+    return status;
 }
 
@@ -1417,5 +1400,5 @@ rb_glob(path, func, arg)
 }
 
-static void
+static int
 push_pattern(path, ary)
     const char *path;
@@ -1423,4 +1406,5 @@ push_pattern(path, ary)
 {
     rb_ary_push(ary, rb_tainted_str_new2(path));
+    return 0;
 }
 
Index: win32/win32.c
===================================================================
RCS file: /cvs/ruby/src/ruby/win32/win32.c,v
retrieving revision 1.164
diff -U2 -p -r1.164 win32.c
--- win32/win32.c	18 Aug 2005 02:07:28 -0000	1.164
+++ win32/win32.c	31 Aug 2005 06:53:37 -0000
@@ -1024,5 +1024,5 @@ typedef struct _NtCmdLineElement {
 #define NTSTRING 0x4	// element contains a quoted string
 
-static void
+static int
 insert(const char *path, VALUE vinfo)
 {
@@ -1038,4 +1038,6 @@ insert(const char *path, VALUE vinfo)
     **tail = tmpcurr;
     *tail = &tmpcurr->next;
+
+    return 0;
 }
 
@@ -1062,5 +1064,5 @@ cmdglob(NtCmdLineElement *patt, NtCmdLin
 	if (*p == '\\')
 	    *p = '/';
-    rb_glob(buf, insert, (VALUE)&tail);
+    rb_glob2(buf, 0, insert, (VALUE)&tail);
     if (buf != buffer)
 	free(buf);


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

In This Thread