Re: Patch for select and APC on win32

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>, <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Patch for select and APC on win32
Date: 2004-03-23 09:21:26
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34B5A5@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> > Here's a patch implementing the "thread method" to
> workaround the bug
> > with socket calls in signal handlers. See details in mail to
> > pgsql-hackers-win32 a couple of minutes ago.
>
> Looks ok, but wouldn't it be better placed in pgstat.c?

Actually, I don't think so. I considered it, and chose to put it in
postmaster.c for the following reason:

The functon pgstat_beterm itself is *not* the problem. In theory, it can
be called from places that are not signal handlers (sure, it's not done
today I think, but internal-API-wise, it could). That goes against
putting the fix ther.

Also, by putting the code inside the actual signal handler function, we
put the fix close to the problem, which makes it more visible in the
"trouble area". The problem is, IMHO, in the signal handler, and not in
the actual pgstat function.

I'll be happy to change this if you still think it's better, but I
figured I shuold put out my argument for doing what I did first :-)

//Magnus

Browse pgsql-patches by date

  From Date Subject
Next Message Karel Zak 2004-03-23 10:10:52 Re: pstrndup()
Previous Message Magnus Hagander 2004-03-23 08:33:36 Re: Initial eventlog support on win32