[Mongrel] mongrel_service fails to get "service.exe" from ppid?

Luis Lavena luislavena at gmail.com
Mon Apr 2 18:50:43 EDT 2007


On 4/2/07, Berger, Daniel <Daniel.Berger at qwest.com> wrote:
> > -----Original Message-----
> > From: mongrel-users-bounces at rubyforge.org
> > [mailto:mongrel-users-bounces at rubyforge.org] On Behalf Of Luis Lavena
> > Sent: Monday, April 02, 2007 1:26 PM
> > To: mongrel-users at rubyforge.org
> > Subject: Re: [Mongrel] mongrel_service fails to get
> > "service.exe" from ppid?
> >
> >
> > On 4/2/07, Berger, Daniel <Daniel.Berger at qwest.com> wrote:
> > > <snip>
> > >
> > > > Maybe I could code some dynamic loading (like psapi in
> > > > proc_info) to workaround this case scenario.
> > > >
> > > > Please let me know the results.
> > >
> > > Are you just trying to get process information? The sys-proctable
> > > package works on MS Windows. I dropped the psapi approach a
> > long time
> > > ago in favor of OLE + WMI. So long as the WMI service is
> > running, it
> > > should work on any Windows platform.
> > >
> >
> > Thanks Dan for the information, but OLE + WMI is overkill for
> > the task. Since I support XP, 2003 and Vista on 32bits
> > platforms, using psapi way is what I wanted.
>
> Overkill? It's abstracted away for you:
>
> require 'sys/proctable'
> include Sys
>
> ProcTable.ps{ |process| p process.ppid }
>

Overkill since I no longer use win32-service nor a ruby process as
service, but a stub native service utility that spawn the ruby process
with mongrel.

>[...]
>
> > Also, I dropped win32-service support on previous releases
> > for a native, compiled implementation that don't hook or
> > crash the RubyVM used by Mongrel. Which worked better, until
> > users start jumping to x64 platforms ;-)
>
> Hm, I really need to revisit win32-service. The whole VC 6 vs VC 8 issue
> has proven to be annoying.
>

As I said previously and a few months back, ruby + green_threads +
sockets + rails + win32 != stable solution.

The most stable and gracefully stoppable I got was using a compiled
service and leave ruby just for mongrel.

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


More information about the Mongrel-users mailing list