Skip site navigation (1) Skip section navigation (2)

Re: [pgsql-hackers-win32] Win32 lost signals open item

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>,"PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>,"PostgreSQL Win32 port list" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item
Date: 2004-11-01 20:53:45
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE476079@algol.sollentuna.se (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-hackers-win32
>> 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?

Because we need to write the duplicated socket structure/pipe handle to
the parameter file. I guess we could create a separate parameter file
just for these things, but that seemed a bit unnecessary.

Basically:
1) To create the new HANDLE, or in the case of a socket, the
WSAPROTOCOL_INFO structure, we need to know the new pid. We can only
know this after CreateProcess(), which sits in win32_forkexec.
2) To get the data down to the backend, we need to put it in the
parameter file, which is done using write_backend_vars().

This gives that we either:
1) Write the data out in write_backend_vars, in which case
write_backend_vars needs to know the pid of the new backend.
or
2) Write the data out in win32_forkexec, in which case we need another
parameter file.

I was thinking (1) was the cleaner approach.

//Magnus

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2004-11-01 20:55:46
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item
Previous:From: Tom LaneDate: 2004-11-01 20:47:28
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item

pgsql-hackers-win32 by date

Next:From: Tom LaneDate: 2004-11-01 20:55:46
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item
Previous:From: Tom LaneDate: 2004-11-01 20:47:28
Subject: Re: [pgsql-hackers-win32] Win32 lost signals open item

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group