Issue #4920 has been reported by Motohiro KOSAKI.

----------------------------------------
Bug #4920: Process.daemon()??若?喝?冴???????????帥?ゃ????若?鴻?????????鐚???ゅ?堺?ャ?????障??
http://redmine.ruby-lang.org/issues/4920

Author: Motohiro KOSAKI
Status: Assigned
Priority: High
Assignee: Motohiro KOSAKI
Category: core
Target version: 1.9.3
ruby -v: ruby 1.9.3dev (2011-06-19 trunk 32170) [x86_64-linux]


??????????????????akr???????????肴????????????????c?????с??????????? trunk???

$ ./ruby -e 'Process.daemon(true,true); p Dir.entries("/proc/self/task")'

????茵?????????????鴻?????????鐚???鴻????障??(Linux??у??茵????????????????鐚????篏????????????????? Process.daemon() 
???絅?罘????帥?ゃ????若?鴻?????????鐚???ゅ?堺?ャ?????障??????????с?????

????????篁ヤ????潟?若????с??

------------------------------------------------------
static VALUE
proc_daemon(int argc, VALUE *argv)
{
    VALUE nochdir, noclose;
    int n;

    rb_secure(2);
    rb_scan_args(argc, argv, "02", &nochdir, &noclose);

    prefork();
    before_fork();
    n = daemon(RTEST(nochdir), RTEST(noclose));
    after_fork();
    if (n < 0) rb_sys_fail("daemon");
    return INT2FIX(n);
}
------------------------------------------------------

BSD篁ュ?????医????с??daemon()???OS???daemon(3)??с??????rb_daemon()???篏睡??????
rb_daemon???????????rb_fork_err()???篏睡????????????腟??????????

    before_fork();
    before_fork();
    fork();
    after_fork();
    after_fork();

?????????若?喝?冴?????綺????????after_fork()??????潟??帥?ゃ????若?鴻???????????ゃ???????у??荐?鐚???鴻?????????

?????<????????1.9.2??с??<??????????????с?????????違?????激?с?潟?с?????
?????????????????????????<??????????????????ф????????????????????????膰?с???????帥?若?蚊????????1.9.3???
荐???????????????????????障?????




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