Re: Win32 signal code - first try - Mailing list pgsql-hackers-win32

From Merlin Moncure
Subject Re: Win32 signal code - first try
Date
Msg-id 303E00EBDD07B943924382E153890E5434AA4E@cuthbert.rcsinc.local
Whole thread Raw
List pgsql-hackers-win32
Magnus Hagander wrote:
> If we are uncertain about delivering signals on an APC (with longjmp
> considerations etc), we could even just do our QueueUserAPC() on a
<snip>

This started to get me really concerned, so I did a fair bit of googling
on the subject.  AFIK, we are probably ok longjmp-ing out of a callback
issued by QueueUserAPC.  There are three mitigating factors wrt longjmp
& QueueUserAPC:

1. The callback runs on the same thread as the backend/signal routine
2. the signal is called/raised at the 'end' of the callback
3. there is very little stack involved.

Here is a link which has some technical info about windows messaging and
process control (courtesy of HP):
http://www.cag.lcs.mit.edu/dynamorio/doc/DynamoRIO.htm

Merlin

pgsql-hackers-win32 by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: Win32 signal code - first try
Next
From: Claudio Natoli
Date:
Subject: Re: Win32 signal code - first try