Project

General

Profile

Actions

Bug #4072

closed

dRubyで作成したサーバプログラムがsleepしていてもexitしてしまう

Added by takkanm (三村 益隆) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Target version:
ruby -v:
-
Backport:
[ruby-dev:42601]

Description

=begin
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]にて、
dRubyを以下のようなserverとclient作成し、server->clientを実行すると、
serverプログラムが例外の表示もなくexitします。
ruby 1.9.3dev (2010-11-19 trunk 29830) [x86_64-darwin10.5.0]でも同様に発生します。

ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.4.0]では、
exitされないことを確認しております。

https://gist.github.com/706260

  • serverプログラム
    require 'drb'

class Hello
def hello(message)
puts message
end
end

begin
DRb.start_service('druby://:12346', Hello.new)
puts DRb.uri
sleep
rescue Object, SystemExit=> e
p e.backtrace
raise e
rescue => e
puts e
end

  • clientプログラム
    require 'drb'
    d = DRbObject.new_with_uri('druby://m-mimura-4.local:12346')
    d.hello "message"
    =end

Files

sleep_forever.patch (1.23 KB) sleep_forever.patch nagachika (Tomoyuki Chikanaga), 06/24/2011 11:10 PM

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #4027: Signal.trap で busy loop に陥るRejected05/23/2011Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0