On 5/22/06, Berger, Daniel <Daniel.Berger qwest.com> wrote:
>
> Where does this backtrace go? I don't see anything
like that when I
> tail the log file:
>
> 2006-05-22 10:38:48 - ** Dead Simple Service
starting...
> 2006-05-22 10:38:50 - ** Done initialization.
> 2006-05-22 10:38:50 - Entering Service Main
> do nothing!
>
> I have no idea why you're seeing that error. I don't
see it.
>
Actually, after the do nothing! you should see
"Leaving Service Main",
which don't happen (don't see why in your setup don't,
but here it do,
winxp).
> There are a couple of issues with your script (which
may actually be
> issues with our sample script). You should re-raise
exceptions or exit
> when one of the commands fails. For example:
>
[...]
> Otherwise, you'll be dropping into a later part of the
script, which is
> probably not what you want.
The command part don't affect the Daemon part, both are
discarted by
the ARGV[0] and the ENV["HOMEDRIVE"]!=nil
Anyway, followed your suggestions (split the ctrl and the
daemon),
with the same result:
2006-05-22 14:19:50 - ** Dead Simple Service starting...
2006-05-22 14:19:52 - ** Done initialization.
2006-05-22 14:19:52 - Entering Service Main
2006-05-22 14:20:00 - Stop Signal received.
do nothing!
U:/Programming/Sources/ruby/try/dead_service.rb:45:in
`service_stop':
uninitialized constant RUNNING (NameError)
from U:/Programming/Sources/ruby/try/dead_service.rb:52:in
`service_main'
from U:/Programming/Sources/ruby/try/dead_service.rb:63
> I think one thing you'll want to avoid is having a
Daemon calling
> methods outside of itself, as you're doing with the
'log' method there,
> which may be the source of the problem. [...]
Removing the call to the outside function (donothing) solved
the
uninitialized constant problem, but the "Leaving
Service Main" never
shows, so looks like was terminated previously (no safe
cleanup).
--
Luis Lavena
Multimedia systems
-
Leaders are made, they are not born. They are made by hard
effort,
which is the price which all of us must pay to achieve any
goal that
is worthwhile.
Vince Lombardi
_______________________________________________
win32utils-devel mailing list
win32utils-devel rubyforge.org
http://rubyforge.org/mailman/listinfo/win32utils-devel |