Re: [HACKERS] [PATCHES] fork/exec patch - Mailing list pgsql-hackers-win32

From Magnus Hagander
Subject Re: [HACKERS] [PATCHES] fork/exec patch
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE2A693B@algol.sollentuna.se
Whole thread Raw
List pgsql-hackers-win32
>A quick test program that runs in an infinite loop reading a file shows
>that the thread does *not* enter alertable state just from that normal
>I/O :-( I need to add an explicit SleepEx(0) to make it do
>that... Which
>means that if you both need to execute the signal handler on the main
>thread, and don't want to mess around with exceptions, you need to add
>polling somewhere in the main thread anyway.


Oh yeah, this is all beside the point if either
a) The signal handlers are already thread-safe (after all, the CONNX
guys called it on a different thread. Did they change anything in the
actual signal handlers, that we know of?)
b) The signal handlers *can be made* thread-safe fairly easy (no need
for re-entrant, but any variable access needs to be synchronized)

If they are, then you can fire the signal handlers on a separate thread,
and just be done with it.

//Mahnus

pgsql-hackers-win32 by date:

Previous
From: "Tony and Bryn Reina"
Date:
Subject: Re: libpq.dll for win32 always using ssl
Next
From: "Magnus Hagander"
Date:
Subject: Re: [HACKERS] [PATCHES] fork/exec patch