1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

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.
This commit is contained in:
Tom Lane
2013-03-17 12:06:42 -04:00
parent d43837d030
commit da5aeccf64
30 changed files with 99 additions and 184 deletions

View File

@ -13,7 +13,7 @@
#include "postgres.h"
#include <libpq/pqsignal.h>
#include "libpq/pqsignal.h"
/*
* These are exported for use by the UNBLOCKED_SIGNAL_QUEUE() macro.
@ -158,7 +158,11 @@ pqsigsetmask(int mask)
}
/* signal manipulation. Only called on main thread, no sync required */
/*
* Unix-like signal handler installation
*
* Only called on main thread, no sync required
*/
pqsigfunc
pqsignal(int signum, pqsigfunc handler)
{

View File

@ -18,8 +18,6 @@
#include "postgres.h"
#include "libpq/pqsignal.h"
/* Communication area for inter-thread communication */
typedef struct timerCA