Hello,
So we are getting closer (if I did not instrument the wrond code):
src/backend/tcop/postgres.c
int
PostgresMain(int argc, char *argv[],
const char *dbname,
const char *username)
{
...
if (am_walsender)
WalSndSignals();
else
{
pqsignal(SIGHUP, SigHupHandler); /* set
flag to read config
* file */
----> register handler here <-------------------------------------
pqsignal(SIGINT, StatementCancelHandler);
/* cancel current query */
----> register handler here <-------------------------------------
pqsignal(SIGTERM, die); /* cancel current query and exit */
...
void
StatementCancelHandler(SIGNAL_ARGS)
{
int save_errno = errno;
elog(WARNING, "StatementCancelHandler() - entered");
/*
* Don't joggle the elbow of proc_exit
*/
if (!proc_exit_inprogress)
{
...
This part is never reached. Does this mean that the signal SIGINT got lost?
Or do I search in the wrong place.
Your help is much appreciated.
Bye
Rainer
On 25.02.2014 19:47, Tom Lane wrote:
> Rainer Tammer <pgsql@spg.schulergroup.com> writes:
>> The semop() should be interrupted by SIGINT, right?
> Yeah. Note that we're expecting the SIGINT handler to do a longjmp,
> so that it doesn't matter whether or not the semop would choose to
> resume waiting after a signal. But it has to execute the handler.
>
> regards, tom lane
>
>