On 5/15/06, Berger, Daniel <[EMAIL PROTECTED]> wrote:
I've forwarded this to the win32utils-devel list to see if anyone has
any insight.


Ok, done a new round of code to pin-point the problem.

Attached it http_service2.rb, this file implements a
Mongrel::Configurator instead of plain HttpServer.

If you check the service_main code, will see that the first version
explicit start (run) the server here, but this instead need to call
run in the service_init to get it working.

Also, there is no need to call @config.stop there, because it never get called.

In previous mail I talked about "ghost process" (or orphaned ones,
whatever). if you change service_main from:

while state == RUNNING
 sleep 1
end

to:

@config.join

It will start and stop ok, but checking the task manager, a ruby.exe
process was left behind, with 3 threads!

I tested this with ruby.exe and rubyw.exe

What really annoys me is that KirbyBase, which also offer a win32
service, join the drb thread (like @config.join) in the service_main
all without problems...

Anyway,

So far, the code in the attach works ok, on any condition, BUT.... the
same setup didn't work for rails (besides there are some issues with
load_plugins).

Please try this new script, and reply or mail me personally.

I really appreciate the time the list take on helping solve this issue.

Regards,

--
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

Attachment: http_service2.rb
Description: Binary data

_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to