From: Nobuyoshi Nakada Date: 2009-04-26T18:59:03+09:00 Subject: [ruby-dev:38335] Re: Bug when daemonizing なかだです。 At Sun, 26 Apr 2009 01:07:21 +0900, rubikitch@ruby-lang.org wrote in [ruby-dev:38329]: > > $ { echo "RUBY_VERSION # =>"; echo '$".grep (/cgi/) # =>'; } | PATH="./bin:$PATH" ruby -Ilib -Ibin bin/xmpfilter --fork > > RUBYLIB=lib を入れてください。 > > $ { echo "RUBY_VERSION # =>"; echo '$".grep (/cgi/) # =>'; } | RUBYLIB=lib PATH="./bin:/usr/bin" /usr/local/bin/ruby191 -Ilib -Ibin bin/xmpfilter --fork > (eval):1: [BUG] Segmentation fault > ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux] > > -- control frame ---------- > c:0016 p:---- s:0049 b:0049 l:000048 d:000048 CFUNC :reopen 最小ケースはこんな感じでした。 r, w = IO.pipe STDOUT.reopen(w) STDOUT.reopen("/dev/null", "r") モードを変更できないために例外が発生するのですが、パイプやソケッ トでreopenされていたときにパスがnilになっていてSEGVしていました。 SEGVに関しては修正しましたが、例外自体はrcodetoolsのほうを修正す る必要があると思います。 -- --- 僕の前にBugはない。 --- 僕の後ろにBugはできる。 中田 伸悦