[Mongrel] Mongrel as Windows service with normal privileges
ml at stiegerhs.de
Thu Jun 5 05:23:40 EDT 2008
I digged a bit through the source code, and I am under the impression
that a normal user may not query the service control manager with
PROCESS_QUERY_INFORMATION. Could this be the case ?
_process_name does not return the name and _process_name_dyn_psapi fails
as well. (tested with 0.3.1 and 0.3.3). It looks like OpenProcess can
not be used in this manner...
In a totally unrelated project  I solved what I think you are trying
to do here differently:
I just pass the parameter "-runservice" from SCM in order to determine
if the application should run as service (called from SCM) or as a
normal console application. Maybe this would be an easier approach for
mongrel_service as well ?
I would create a proof of concept, but unfortunately, I am not
proficient with FreeBasic...
Ingmar Stieger wrote:
> CurrentPID: 5108
> ParentPID: 512
> Error with OpenProcess
> GetLastError: 0The operation completed successfully.
> Parent Name:
> ServiceController.RunMode() done
> ServiceHost() destructor
> ServiceHost() destructor done
> ServiceProcess() destructor
> ServiceProcess() destructor done
> _terminate() destructor
> _terminate() destructor done
More information about the Mongrel-users