Wed Aug 10 20:19:13 PDT 2005
- Previous message: [Slony1-general] Slony >> Multi Master Replication???
- Next message: [Slony1-general] win32 service code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I will apply this within a day or two if there are no objections. Regards, Dave. -----Original Message----- From: "Magnus Hagander"<mha at sollentuna.net> Sent: 07/08/05 17:08:44 To: "slony1-general at gborg.postgresql.org"<slony1-general at gborg.postgresql.org> Subject: [Slony1-general] win32 service code Hi, here is a first attempt at win32 service integration. It uses option 3 per the previous mail - this was actually also the easiest to do, even easier than option 1. It will look for a list of config files in the Engine subkey of the service configuration parameters in the registry - one entry per file, the name of the value is ignored, just the filename is read. It will launch a slon.exe for each of these specifying the config file. If one of the processes die while the service is running, it will be restarted. When the service is shut down, all slon.exe processes are killed hard. It also contains eventlog integration code, since you can't log to stdout/stderr whlie running as a service. It's only activated when started as a service (set using a global variable). We still write the log to stdout when running as a service, in case extra debugging is needed. Finally, it fixes a bug in the logging code which failed to initialize outbuf to the empty string if log_timestamp and log_pid were both off. The files "win32service.c|h" go in the port directory. //Magnus -----Unmodified Original Message----- Hi, here is a first attempt at win32 service integration. It uses option 3 per the previous mail - this was actually also the easiest to do, even easier than option 1. It will look for a list of config files in the Engine subkey of the service configuration parameters in the registry - one entry per file, the name of the value is ignored, just the filename is read. It will launch a slon.exe for each of these specifying the config file. If one of the processes die while the service is running, it will be restarted. When the service is shut down, all slon.exe processes are killed hard. It also contains eventlog integration code, since you can't log to stdout/stderr whlie running as a service. It's only activated when started as a service (set using a global variable). We still write the log to stdout when running as a service, in case extra debugging is needed. Finally, it fixes a bug in the logging code which failed to initialize outbuf to the empty string if log_timestamp and log_pid were both off. The files "win32service.c|h" go in the port directory. //Magnus
- Previous message: [Slony1-general] Slony >> Multi Master Replication???
- Next message: [Slony1-general] win32 service code
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list