Re: Signals inheritance work - major problems

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Win32 port list" <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: Signals inheritance work - major problems
Date: 2004-11-03 20:36:23
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE4760AA@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

> > 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.)

Right. It's the PG_SETMASK that causes teh crash.

> 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.

Hmm. I thought I looked at that and for some reason thought it was bad.
Can't remember what it was any more. I'll try something along this line
and let you know how it works out.

//Magnus

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Bruce Momjian 2004-11-03 20:37:01 Re: Signals inheritance work - major problems
Previous Message Tom Lane 2004-11-03 20:29:34 Re: Signals inheritance work - major problems