Re: [pgsql-hackers-win32] Win32 lost signals open item
Re: [pgsql-hackers-win32] Win32 lost signals open item
От:
"Magnus Hagander" <mha@sollentuna.net>
Дата:
>> [ proposed fix ] >> As you can see, this is quite a bit more complicated than the simple >> CreateProcess() call we have now. >> ... >> If this seems like a reasonable approach, I can see if I can get >> something together. But it's a fairly large change.. > >It sounds reasonable to me, in the sense that it is a localized change, >even if rather messy. (Perhaps this chunk of code should be >pushed into >src/port someplace, instead of being dropped into postmaster.c?) That's an idea. However, since this has to be tied in with the creationi of the backend-parameter-file, it's going to have to hit write_backend_variables() in some way, and have access to postmaster variables. I think it might be even more messy to push it out. Basically, I think internal_forkexec() needs to be split up into two - one win32 and one other. For win32 version, it needs to CreateProcess() *before* it does write_backend_variables(), and then pass the process id as a parameter to write_backend_vars(). I think if it should be broken out, we need to break the whole package of internal_forkexec, read/write_backend_vars, and probably SubPostmasterMain() out somewhere. Not sure it's worth it. //Magnus
Re: [pgsql-hackers-win32] Win32 lost signals open item
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"Magnus Hagander" writes: > Basically, I think internal_forkexec() needs to be split up into two - > one win32 and one other. For win32 version, it needs to CreateProcess() > *before* it does write_backend_variables(), and then pass the process id > as a parameter to write_backend_vars(). Huh? Why? regards, tom lane