Re: Simplify Win32 Signaling code
От | Magnus Hagander |
---|---|
Тема | Re: Simplify Win32 Signaling code |
Дата | |
Msg-id | 6BCB9D8A16AC4241919521715F4D8BCE6C75AA@algol.sollentuna.se обсуждение исходный текст |
Ответ на | Simplify Win32 Signaling code (Qingqing Zhou <zhouqq@cs.toronto.edu>) |
Список | 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
В списке pgsql-patches по дате отправления: