[#24112] ruby/tk crashes on bcc32 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。原因を追求してたのですが、力尽きました。

19 messages 2004/08/18
[#24127] Re: ruby/tk crashes on bcc32 — Hidetoshi NAGAI <nagai@...> 2004/08/19

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

[#24131] Re: ruby/tk crashes on bcc32 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/08/19

山本です。

[#24135] Re: ruby/tk crashes on bcc32 — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/08/19

山本です。試行錯誤の結果、これで落ちなくなりました。

[ruby-dev:24106] return value of Process.daemon

From: Tanaka Akira <akr@...17n.org>
Date: 2004-08-18 02:57:41 UTC
List: ruby-dev #24106
えぇと、めでたく Process.daemon が実装されて嬉しいのですが、返値に意味
のない場合には、返値は 0 よりも nil のほうが意外でないように思うのです
が、0 のほうが適切な理由はあるでしょうか?

Index: process.c
===================================================================
RCS file: /src/ruby/process.c,v
retrieving revision 1.109
diff -u -p -r1.109 process.c
--- process.c	17 Aug 2004 09:02:39 -0000	1.109
+++ process.c	18 Aug 2004 02:53:05 -0000
@@ -2665,12 +2665,12 @@ proc_setmaxgroups(obj, val)
 
 /*
  *  call-seq:
- *     Process.daemon()			   => fixnum
- *     Process.daemon(nochdir=0,noclose=0) => fixnum
+ *     Process.daemon()                        => nil
+ *     Process.daemon(nochdir=nil,noclose=nil) => nil
  *
  *  Detach the process from controlling terminal and run in
  *  the background as system daemon.  Unless the argument
- *  nochdir is true (i.e. non false), it changes the current
+ *  nochdir is true (i.e. not false or nil), it changes the current
  *  working directory to the root ("/"). Unless the argument
  *  noclose is true, daemon() will redirect standard input,
  *  standard output and standard error to /dev/null.
@@ -2689,7 +2689,7 @@ proc_daemon(argc, argv)
 #if defined(HAVE_DAEMON)
     n = daemon(RTEST(nochdir), RTEST(noclose));
     if (n < 0) rb_sys_fail("daemon");
-    return INT2FIX(n);
+    return Qnil;
 #elif defined(HAVE_FORK)
     switch (rb_fork(0, 0, 0)) {
     case -1:
@@ -2712,7 +2712,7 @@ proc_daemon(argc, argv)
         if (n > 2)
             (void)close (n);
     }
-    return INT2FIX(0);
+    return Qnil;
 #else
     rb_notimplement();
 #endif

あと、ChangeLog は?
-- 
[田中 哲][たなか あきら][Tanaka Akira]

In This Thread

Prev Next