From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: Simplify Win32 Signaling code |
Date: | 2005-06-02 14:02:47 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE6C75AA@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
> This patch simplified Win32 signaling code per discussion in
> hackers. In this implementation, each process will have a
> named (by its pid) mutex, named shared memory area and named
> event in global namespace. The process is sending/receiving
> signals as the following:
>
> (*) the process who kill the signal:
> - Grab the named mutex, set signal bit in target process's
> shared memory area and SetEvent(), then it is done;
>
> (*) the process who should receive the signal:
> - the main thread of this process could be awakened by the
> event from waiting status(like semop()) or
> CHECK_FOR_INTERRUPTS() actively; -- there is no other threads
> of the process;
>
> Details could be found in this thread and follows:
> http://archives.postgresql.org/pgsql-hackers/2005-05/msg01388.php
Looking at this patch reminds me of another discussion we had:
Signals sent by the postmaster *before the signaling code is running in
the child* has to be handled.
This is handled in the curernt code by creating the pipe in the
postmaster and then inheriting it. You'll need something similar in this
one - create the stuff in the postmaster and inherit it down. (this is
the initial_signal_pipe and pgwin32_create_signal_listener(), which you
removed)
Sorry, forgot to bring this up earlier because I had completely forgot
it. You'll find some details if you search the archives, I beleive.
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2005-06-02 14:15:09 | Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support |
Previous Message | Qingqing Zhou | 2005-06-02 13:23:41 | Simplify Win32 Signaling code |