Daemons lib not dong much?...

Discussion in 'Ruby' started by sa 125, Dec 18, 2008.

  1. sa 125

    sa 125 Guest

    Hello - I'm trying to run a background daemon that will monitor changes
    in a mysql database. The file to monitor the changes works fine when run
    by itself from the prompt as
    $ ruby changes.rb

    However, when I try to use it in a daemon file, not much happens. Here's
    the file (changes_daemon.rb):

    require 'daemons'
    # all the other required come here

    def main
    Daemons.run(path_to_file)
    end

    if __FILE__ == $0
    main
    end


    When I run this at the prompt:
    $ruby changes_daemon.rb start
    $ (next shell line after hitting return - no errors)

    Nothing happens (it's supposed to write to a table and a log file, so I
    can see if anything occurs).

    Any insights will be great - thanks!
    --
    Posted via http://www.ruby-forum.com/.
     
    sa 125, Dec 18, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. about daemons and IPC

    , Aug 27, 2006, in forum: Python
    Replies:
    4
    Views:
    342
    Irmen de Jong
    Aug 29, 2006
  2. Replies:
    2
    Views:
    448
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Sep 13, 2006
  3. Andrey
    Replies:
    0
    Views:
    366
    Andrey
    Sep 12, 2007
  4. cpp4ever
    Replies:
    3
    Views:
    398
    Francesco
    Sep 8, 2009
  5. Raymond Schanks
    Replies:
    0
    Views:
    593
    Raymond Schanks
    Apr 11, 2010
Loading...

Share This Page