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

Berger, Daniel Daniel.Berger at qwest.com
Mon Apr 2 18:01:53 EDT 2007


> -----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 }
 
> The dynamic loading of functions under x64 platforms is 
> though, but could work around it (also, waiting for my OEM 
> Vista to arrive... damn postal parcels!)

With sys-proctable, you needn't worry about such things.

> The funny thing is "So long as the WMI service is running" ;-)

Well, it's enabled by default. So, unless someone goes in and turns it
off, it's running.
 
> 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.

Regards,

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the Mongrel-users mailing list