Re: [HACKERS] [PATCHES] fork/exec patch
От | Steve Tibbett |
---|---|
Тема | Re: [HACKERS] [PATCHES] fork/exec patch |
Дата | |
Msg-id | 546CD3100F4C0F42A30A94C0F2B349148FC639@zimmail1.zim.zimismobile.com обсуждение исходный текст |
Список | pgsql-hackers-win32 |
>>Right. I expect we'll need 3 extra command line switches: one to >>install as a service, one to remove the service, and one to run as a >>service. Or possibly a small wrapper for the install/remove part, plus >>one extra command switch. >Normally, that would be handled by the installation program. But >there'd definitly be a need for a manual way to do it as well, >yes. (There are tools in the resource kit, but people shouldn't need that) The convention is: # install the service mysvc.exe -i # uninstall the service mysvc.exe -u When your service is "installed", simply invoking it should cause it to register itself with the service control manager, which can then send it commands. This will make it work when the user does: net start postmaster net stop postmaster This uses the same mechanism that gets used when you go to the Services control panel and ask a service to stop. >We'd probably need a tool like "pgsignal" or something that >would send signals to the backends. Since you can't use the >kill commandline tool (that one only supports what would be >called kill -9 on unix) When the user says "net stop postmaster", an entry point in postmaster will be called by the Service Control Manager. Then postmaster will have to send the signals to the other processes asking them to stop and presumably wait for them to stop before terminating itself. -- Steve Tibbett stibbett@zim.biz
В списке pgsql-hackers-win32 по дате отправления: