Re: SIGFPE handler is naive - Mailing list pgsql-hackers

From Greg Stark
Subject Re: SIGFPE handler is naive
Date
Msg-id CAM-w4HNDbuaKSL3-L9yZgUqKC6bpwi1jZazfLykA=8no2JHETw@mail.gmail.com
Whole thread Raw
In response to Re: SIGFPE handler is naive  (Nils Goroll <slink@schokola.de>)
Responses Re: SIGFPE handler is naive
List pgsql-hackers
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.

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?

-- 
greg



pgsql-hackers by date:

Previous
From: Nils Goroll
Date:
Subject: Re: SIGFPE handler is naive
Next
From: "Kevin Grittner"
Date:
Subject: Re: default_isolation_level='serializable' crashes on Windows