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

Luis Lavena luislavena at gmail.com
Tue Mar 27 07:44:46 EDT 2007

On 3/27/07, blindance at gmail.com <blindance at gmail.com> wrote:
> Thank you very much for your cooperation and sooner response,
> >services run under windows (32bits) with "services.exe" as parent
> >process. Could you use ProcessExplorer [1] to check other services
> >working and who its process parent?
> Yes, as same as Win32,
> "services.exe" is the parent process of "svchost.exe", "snmp.exe" ,
> "mysqld-nt.exe", "VMwareService.exe", etc.
> and only "services.exe" and "svchost.exe" is 64-bit image.
> I'm sorry that "service.exe" in the subject is a TYPO.

The typo wasn't a problem ;-)

> >I attached a 7z file with proc_info.exe, which will test if the WinAPI
> >used works. Please run it front the command line, the expected output
> >will be:
> The result is :
>  this process (PID, name): 2192, proc_info.exe
>  parent process (PID, name): 3024, <unknown>
> "<unknown>" is the error or the warning word returned by
> "_process_name" function of ServiceFB.
> and "_process_name" function uses Win32API "HANDLE" typedef via FreeBasic libs,
> and the size of HANDLE of Win32API differs from the other one of Win64API.

Actually, by default _process_name uses "<unknown>" as default string,
since some cases getting process name seems to fail... like in *this*

_process_name is used for both calls, one getting
_process_name(GetCurrentProcessId()) and the second getting
_process_name from _parent_process(GetCurrentProcessId())

> so, if "proc_info.exe" is getting its process name without its PID,
> I guess that the root of this compatibility problem will exist around here.
> #if so, Perhaps I should not be bothering you with this...

If Parent PID number (3024) matched cmd.exe in this case, it seems the
problem isn't related to _process_name.

> > If that works, that means the Services and Controller application
> > (services.exe) is named differently under x64, or due 32bits
> > compatibility run as child process of _another_ process :-P
> > With that information I could patch mongrel_service current version :-)
> mmm, How about these results?

These shows me almost every function is working, but maybe enumerating
running process (using PSAPI) is failing.

I'll try to GDB tonight and compare 32bits with x64 API callings.

Thanks for your reply :-)

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