repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git]
/
sample
/
drb
/
ring_place.rb
blob
0ceef7c65af0329e64d7268d98c8ae83069ba4d6
1
require 'drb/drb'
2
require 'rinda/ring'
3
require 'rinda/tuplespace'
4
5
unless $DEBUG
6
# Run as a daemon...
7
exit!( 0 ) if fork
8
Process.setsid
9
exit!( 0 ) if fork
10
end
11
12
DRb.start_service(ARGV.shift)
13
14
ts = Rinda::TupleSpace.new
15
place = Rinda::RingServer.new(ts)
16
17
if $DEBUG
18
puts DRb.uri
19
DRb.thread.join
20
else
21
STDIN.reopen('/dev/null')
22
STDOUT.reopen('/dev/null', 'w')
23
STDERR.reopen('/dev/null', 'w')
24
DRb.thread.join
25
end