From: | "Steve Tibbett" <stibbett(at)zim(dot)biz> |
---|---|
To: | "pgsql-hackers-win32" <pgsql-hackers-win32(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] [PATCHES] fork/exec patch |
Date: | 2003-12-16 19:19:03 |
Message-ID: | 546CD3100F4C0F42A30A94C0F2B349148FC639@zimmail1.zim.zimismobile.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)zim(dot)biz
From | Date | Subject | |
---|---|---|---|
Next Message | Dann Corbit | 2003-12-16 19:20:02 | Re: [HACKERS] [PATCHES] fork/exec patch |
Previous Message | Merlin Moncure | 2003-12-16 19:12:21 | Re: [HACKERS] [PATCHES] fork/exec patch |