Re: [HACKERS] [PATCHES] fork/exec patch
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] [PATCHES] fork/exec patch |
Дата | |
Msg-id | 200312171530.hBHFUBh05241@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] [PATCHES] fork/exec patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [HACKERS] [PATCHES] fork/exec patch
|
Список | pgsql-hackers-win32 |
Tom Lane wrote: > "Magnus Hagander" <mha@sollentuna.net> writes: > > Well. There is one in the form of "make signal handlers thread-safe or > > defer non-threadsafe handlers". > > As long as there is only one thread that can invoke signal handlers, > I don't see why you think they need to be "thread-safe". > > It's already the case that we either handle execution of a signal > handler everywhere, or block delivery of the signal where we can't > handle it, because in the Unix model a signal handler can execute > anytime. > > I'd be more concerned about whether the proposed implementation accurately > models signal mask processing (ie, temporary blocking of signal delivery). On the Win32 project page: http://momjian.postgresql.org/main/writings/pgsql/project/win32.html I see for the CONNX driver code that handles signal masking: /* The sigsetmask system call replaces the set of blocked signals totally with a new set specified in mask. Signals are blocked if the corresponding bit in mask is a 1. */ int sigsetmask(int nNewMask) { int nPreviousMask = nGlobalSignalMask; nGlobalSignalMask = nNewMask; return nPreviousMask; } int sigmask(int nSignal) { return 1 << ((nSignal) - 1); } CONNX_signal_function CONNX_signal(int sig, CONNX_signal_function func) { CONNX_signal_function oldfunc; oldfunc = CONNX_signal_array[sig]; CONNX_signal_array[sig] = func; return oldfunc; } -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-hackers-win32 по дате отправления: