From: Cd Cd Date: 2007-09-12T13:55:26+09:00 Subject: Re: Threads and daemons Cd Cd wrote: > Cd Cd wrote: >>> >>> Whenever I see `...` or %x{...} without it being an assignment it >>> triggers me to question it. >>> >>>> So do I move join into the do/end block? >>> >>> Try this modification to your program: >>> >>> #!/usr/bin/env ruby >>> threads = [] >>> 4.times do >>> threads << Thread.new do >>> output = %x{/usr/local/bin/party} >>> puts "party output: " + output >>> end >>> end >>> threads.each{|thr| thr.join} >>> exit 0 >>> >>> Is there any output from your "party" program? I am hoping there will >>> be errors shown there that were not displayed before that will lead >>> you to the problem. >>> >> There are two errors that I haven't before. 1)When I hit ctrl-c, I see the following ./party.rb:9:in `join': Interrupt from ./party.rb:9 from ./party.rb:9:in `each' from ./party.rb:9 2)Then, when I'm at the bash prompt, anything I type doesn't echo back. -- Posted via http://www.ruby-forum.com/.