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 [1] 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...

Bye,
Ingmar

[1] http://www.nwnx.org

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


_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to