From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Greg Stark <stark(at)mit(dot)edu> |
Cc: | Nils Goroll <slink(at)schokola(dot)de>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: SIGFPE handler is naive |
Date: | 2012-08-14 12:40:06 |
Message-ID: | CA+TgmobZ+LH75P43kGAaR4QkaTc-Od9m0zX-Nj+5OYgy90rEWA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 14, 2012 at 6:50 AM, Greg Stark <stark(at)mit(dot)edu> wrote:
> It is possible to check if the signal was synchronous or was sent from
> an external process. You can check siginfo->si_pid to see who sent you
> the signal. I'm not sure checking that and handling it at
> check_for_interrupts if it's asynchronous is the best solution or not
> though.
If that's portable it might be an option, but I doubt that it is.
> I'm a bit confused. Didn't Tom do the laborious process of checking
> the whole source tree for situations where there's shared memory
> cleanup to be done in and arrange for it to happen? That was the
> blocking factor to get pg_cancel_backend() to work. Is the problem
> that the sigfpe handler doesn't invoke atexit() handlers?
No, the problem is that SIGFPE throws an error *from the signal
handler* rather than waiting for ProcessInterrupts().
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | ktm@rice.edu | 2012-08-14 12:55:02 | Re: SIGFPE handler is naive |
Previous Message | Robert Haas | 2012-08-14 12:38:44 | Re: SIGFPE handler is naive |