Mladen Turk wrote:

-----Original Message-----
From: jean-frederic clere
It has:
--StartupClass -> called when hit Service start. --ShutdownClass -> called when you hit Stop service...
The idea is the following:
--InitClass -> called when starting
Change user to a non-privileged user (like nobody/nodoby I have seen something like that in cygwin so that must also exist in win32 API). --StartupClass -> really start the service. --ShutdownClass -> shutdown the service (something like a suspend). --DestroyClass -> cleanup.


Couple of questions:

1. Is the InitClass present during entire service life cycle, or it
returns after the call?
Sorry I have missed my explainations:
The InitClass/StartupClass/Shutdown/DestroyClass should be methods of one class that provide the service.
Init must return after finishing (blocking).
Startup that is more complicated in the Daemon it returns and the threads are created inside the Startup method. But if we call a main it will not return...
Shutdown must return.
Destroy ... Well should also return and block.

Basically do we need to call that (InitClass and StartupClass) from
separate threads.

2. What do you mean by changing the user after the call to InitClass?
The idea is to make sure that a Web application is runned on non-privileged user (like httpd). The idea is that the OS should prevent "critical" file beeing modified or read in a Web application.

3. Can those classes follow the class;method[;params] priciple?
Sure. But probably one class is enough.

MT.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to