Re: WIN32 psql Ctrl+C support - Mailing list pgsql-patches

From Magnus Hagander
Subject Re: WIN32 psql Ctrl+C support
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE171599@algol.sollentuna.se
Whole thread Raw
In response to WIN32 psql Ctrl+C support  (Ludek Finstrle <luf@pzkagis.cz>)
Responses Re: WIN32 psql Ctrl+C support  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
You need to make all variable access (including libpq, I think) in the
handler threadsafe. The control handler will execute on a different
thread from the main one (see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc
/base/handlerroutine.asp).

One way to do this could be to have the handler just set an event or a
variable, and then poll this one in the main thread. For more
information about these issues, see recent threads on signal handling on
pgsql-hackers-win32 (which deals with the server, but much the same
issues).


//Magnus


> -----Original Message-----
> From: Ludek Finstrle [mailto:luf@pzkagis.cz]
> Sent: Wednesday, January 14, 2004 1:03 PM
> To: pgsql-patches@postgresql.org
> Subject: [PATCHES] WIN32 psql Ctrl+C support
>
>
> Hello,
>
>   I write Ctrl+C support for Win32 psql client. I create diff
> againist CVS snapshoted today.
>
> Comments are welcome
>
> Luf
>

pgsql-patches by date:

Previous
From: Ludek Finstrle
Date:
Subject: WIN32 psql Ctrl+C support
Next
From: Reece Hart
Date:
Subject: invisible characters in readline