Lists: | pgsql-committerspgsql-hackers |
---|
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Move pqsignal() to libpgport. |
Date: | 2013-03-17 16:06:59 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Move pqsignal() to libpgport.
We had two copies of this function in the backend and libpq, which was
already pretty bogus, but it turns out that we need it in some other
programs that don't use libpq (such as pg_test_fsync). So put it where
it probably should have been all along. The signal-mask-initialization
support in src/backend/libpq/pqsignal.c stays where it is, though, since
we only need that in the backend.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/da5aeccf64b37a8e9bd3cb605848590595dbcbf8
Modified Files
--------------
contrib/pgbench/pgbench.c | 1 -
src/backend/access/transam/xlog.c | 1 -
src/backend/libpq/pqsignal.c | 67 +---------------------------
src/backend/main/main.c | 3 -
src/backend/port/win32/signal.c | 8 +++-
src/backend/port/win32/timer.c | 2 -
src/backend/replication/walsender.c | 1 -
src/backend/utils/misc/timeout.c | 1 -
src/bin/initdb/.gitignore | 1 -
src/bin/initdb/Makefile | 9 +---
src/bin/initdb/initdb.c | 1 -
src/bin/pg_basebackup/pg_receivexlog.c | 1 -
src/bin/pg_ctl/pg_ctl.c | 1 -
src/bin/psql/common.c | 2 -
src/bin/psql/copy.c | 1 -
src/bin/psql/print.c | 1 -
src/bin/scripts/common.c | 1 -
src/include/libpq/pqsignal.h | 11 +----
src/include/port.h | 7 +++
src/interfaces/libpq/Makefile | 2 +-
src/interfaces/libpq/bcc32.mak | 2 -
src/interfaces/libpq/fe-misc.c | 1 -
src/interfaces/libpq/fe-print.c | 1 -
src/interfaces/libpq/fe-secure.c | 1 -
src/interfaces/libpq/pqsignal.c | 49 --------------------
src/interfaces/libpq/pqsignal.h | 25 ----------
src/interfaces/libpq/win32.mak | 2 -
src/pl/plperl/plperl.c | 1 -
src/port/Makefile | 3 +-
src/port/pqsignal.c | 76 ++++++++++++++++++++++++++++++++
30 files changed, 99 insertions(+), 184 deletions(-)
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Move pqsignal() to libpgport. |
Date: | 2013-03-17 17:52:02 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Sun, 2013-03-17 at 16:06 +0000, Tom Lane wrote:
> Move pqsignal() to libpgport.
>
> We had two copies of this function in the backend and libpq, which was
> already pretty bogus, but it turns out that we need it in some other
> programs that don't use libpq (such as pg_test_fsync). So put it where
> it probably should have been all along. The signal-mask-initialization
> support in src/backend/libpq/pqsignal.c stays where it is, though, since
> we only need that in the backend.
>
Hi,
When I try to compile HEAD right after this commit, I have this issue
with pg_receivexlog:
pg_receivexlog.c: In function ‘main’:
pg_receivexlog.c:425:11: error: ‘SIGINT’ undeclared (first use in this
function)
pg_receivexlog.c:425:11: note: each undeclared identifier is reported
only once for each function it appears in
The attached patch fixes this. Not sure it's the right fix though...
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
signal.patch | text/x-patch | 368 bytes |
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Cc: | "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Move pqsignal() to libpgport. |
Date: | 2013-03-17 18:13:08 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> On Sun, 2013-03-17 at 16:06 +0000, Tom Lane wrote:
>> Move pqsignal() to libpgport.
> When I try to compile HEAD right after this commit, I have this issue
> with pg_receivexlog:
Oddly, I didn't see that on the machine I was testing on --- it must
have something else pulling in <signal.h> there. Fixed.
regards, tom lane
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [COMMITTERS] pgsql: Move pqsignal() to libpgport. |
Date: | 2013-03-17 18:17:28 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-committers pgsql-hackers |
On Sun, 2013-03-17 at 14:13 -0400, Tom Lane wrote:
> Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> > On Sun, 2013-03-17 at 16:06 +0000, Tom Lane wrote:
> >> Move pqsignal() to libpgport.
>
> > When I try to compile HEAD right after this commit, I have this issue
> > with pg_receivexlog:
>
> Oddly, I didn't see that on the machine I was testing on --- it must
> have something else pulling in <signal.h> there. Fixed.
>
Thanks.
--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com