Sun Jul 17 16:06:36 PDT 2005
- Previous message: [Slony1-general] [PATCH] Fix for slonik get_sharepath
- Next message: [Slony1-general] [PATCH] Fix for slonik get_sharepath
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi! Here is a first rough patch for slon to run on win32. It does enough so that I can replicate back and forth between my linux and win32 boxes. There are a lot of thigns still to do - there is no service integratino (though the code expects it..), no eventlog etc. but it's a start, and I figured I should get it out there for people to comment on and possibly apply so it won't conflict with others... Changes: * Added "override" to LDFLAGS in the Makefile. I am no makefile guru, so I don't really know why :-) But it was there for CFLAGS, and without it, the pthreads library simply wasn't added to the build command... * For win32 only, added mandatory link to "wsock32" winsock functions, required so we can access TCP/IP functions at all. * #ifdef out the whole "watchdog process" for win32. Win32 does not have signals, so we don't need a special process to catch and channel those. And we expect the service control manager to deal with restarts as required (when it comes). * As a consequence of win32 not having signals, change exits to just do exit() instead of sigterm:ing the own process. This includes modifying slon_abort() and slon_restart() (_restart seems never to be used?) * Import pgpipe implementation from postgresql backend, and change all read/write to piperead/pipewrite - same as in the pg backend. This is rquired because on win32 you can't "select()" on a pipe. The pgpipe implementation uses TCP sockets instead. * Remove teh sched_shutdown() code per my previous mail. Not strictly a part of the win32 work... Those are the main changes. pipe.c goes in src/slon/. It's a direct import from postgresql with the only change being the replacement of ereport with slon_log. //Magnus -------------- next part -------------- A non-text attachment was scrubbed... Name: pipe.c Type: application/octet-stream Size: 2480 bytes Desc: pipe.c Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050717/0784ec04/pipe-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: slon_win32.patch Type: application/octet-stream Size: 15067 bytes Desc: slon_win32.patch Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050717/0784ec04/slon_win32-0001.obj
- Previous message: [Slony1-general] [PATCH] Fix for slonik get_sharepath
- Next message: [Slony1-general] [PATCH] Fix for slonik get_sharepath
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list