AG> Then what is MessageQueue? (I haven't foud it at my Ruby sources )
It is part of sysvipc: http://deisui.bug.org/~ueno/ruby/sysvipc.html
Pretty useful stuff!

AG> Can it on ctrl+c terminate the process without passing control to Ruby's
AG> "atexit" functions?

It's interesting that if I define an at_exit function, it will run on
ctrl+c but the ensure block does not:

require 'sysvipc'
include SystemVIPC

begin
  key = ftok __FILE__, 1
  msq = MessageQueue.new key, 0700 | IPC_CREAT
  
  at_exit {
    puts "in at_exit block"
    msq.remove
  }

  # enqueue  messages
  0.upto(1) do |x|
    msq.send 100, x.to_s
  end
  
  # dequeue messages
  while (s =  msq.recv 100, 100)
    puts "got: #{s}"
  end
  
  # remove the queue
ensure
  puts "ensure block"
  msq.remove
end


joe@merry:~$ !.
./junker.rb
got: 0
got: 1
^C./junker.rb:27: Interrupt
in at_exit block

thanks,
-joe