Re: socket calls in signal handler (WAS: APC + socket restrictions un der Win32?)

From: Kurt Roeckx <Q(at)ping(dot)be>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: socket calls in signal handler (WAS: APC + socket restrictions un der Win32?)
Date: 2004-03-08 22:55:20
Message-ID: 20040308225520.GA5003@ping.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 08, 2004 at 11:33:17PM +0100, Magnus Hagander wrote:
>
> >The postmaster's use of nominally unsafe stuff in signal
> >handlers is not
> >and never has been a problem, because there is only one place in the
> >main loop where signals are unblocked, thus no possibility for
> >something
> >to interrupt something else. I don't like the idea of redesigning that
> >code just because someone misunderstands it.
>
>
> You're saying the above is not valid because we block signals?

It's all about reentrance of functions where it's not safe to do
so.

Either you avoid it in the signal handler or you avoid it by only
allowing it during a "safe" period.

Kurt

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2004-03-08 23:11:01 Re: socket calls in signal handler (WAS: APC + socket restrictions un der Win32?)
Previous Message Magnus Hagander 2004-03-08 22:33:17 Re: socket calls in signal handler (WAS: APC + socket restrictions un der Win32?)