Re: pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re
Date
Msg-id 4489.1464923061@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-committers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> On 6/2/16 1:28 PM, Tom Lane wrote:
>> Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_restore.

> These changes introduced several new compiler warnings under fortify rules:

> parallel.c: In function ‘sigTermHandler’:
> parallel.c:556:9: warning: ignoring return value of ‘write’, declared
> with attribute warn_unused_result [-Wunused-result]

Hm, interesting --- I copied that write_stderr() macro from psql/common.c
and figured it was good.  But now that I look, only the uses of it in the
Windows code path there are straightforward; on the Unix side we have

            rc = write_stderr("Cancel request sent\n");
            (void) rc;            /* ignore errors, nothing we can do here */

which evidently was done to shut up exactly this type of overly-nannyish
warning.  I'm thinking we need to hide that dead-chicken-waving in the
macro itself.  Will deal with it tomorrow.

            regards, tom lane


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pgsql: Redesign handling of SIGTERM/control-C in parallel pg_dump/pg_re
Next
From: Robert Haas
Date:
Subject: pgsql: Cosmetic improvements to freeze map code.