Skip site navigation (1) Skip section navigation (2)

Re: Signals inheritance work - major problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "PostgreSQL Win32 port list" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Signals inheritance work - major problems
Date: 2004-11-03 20:29:34
Message-ID: 16565.1099513774@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers-win32
"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> But if I move the signals initialization code to after the backend file
> read, that is a *lot* later. This is also *after* the backend has set up
> it's signal handlers, which will crash if things aren't initialized.

Hm?  read_backend_variables() happens in SubPostmasterMain(), which
certainly hasn't yet set up any signal handlers.  (It has done a
PG_SETMASK, but that could be moved down a few lines if it's a problem;
but my guess is that you want to do that before starting the signals thread
anyway.)

I'd be inclined to think in terms of just moving the
pgwin32_signal_initialize() call out of main.c and into
SubPostmasterMain; you'd also need it in PostmasterMain and
BootstrapMain I suppose, but that's not as bad as any of the
alternatives you mention.

			regards, tom lane

In response to

Responses

pgsql-hackers-win32 by date

Next:From: Magnus HaganderDate: 2004-11-03 20:36:23
Subject: Re: Signals inheritance work - major problems
Previous:From: Magnus HaganderDate: 2004-11-03 16:30:21
Subject: Re: Signals inheritance work - major problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group