mirror of
https://github.com/postgres/postgres.git
synced 2025-05-21 15:54:08 +03:00
Remove pqsignalinquire(), which is unused and has portability issues.
This commit is contained in:
parent
627f25bde3
commit
53409f1b37
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.24 2004/12/31 22:03:50 pgsql Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.24.6.1 2006/05/30 15:58:07 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This shouldn't be in libpq, but the monitor and some other
|
* This shouldn't be in libpq, but the monitor and some other
|
||||||
@ -44,29 +44,3 @@ pqsignal(int signo, pqsigfunc func)
|
|||||||
return oact.sa_handler;
|
return oact.sa_handler;
|
||||||
#endif /* !HAVE_POSIX_SIGNALS */
|
#endif /* !HAVE_POSIX_SIGNALS */
|
||||||
}
|
}
|
||||||
|
|
||||||
pqsigfunc
|
|
||||||
pqsignalinquire(int signo)
|
|
||||||
{
|
|
||||||
#ifndef WIN32
|
|
||||||
#if !defined(HAVE_POSIX_SIGNALS)
|
|
||||||
pqsigfunc old_sigfunc;
|
|
||||||
int old_sigmask;
|
|
||||||
|
|
||||||
/* Prevent signal handler calls during test */
|
|
||||||
old_sigmask = sigblock(sigmask(signo));
|
|
||||||
old_sigfunc = signal(signo, SIG_DFL);
|
|
||||||
signal(signo, old_sigfunc);
|
|
||||||
sigblock(old_sigmask);
|
|
||||||
return old_sigfunc;
|
|
||||||
#else
|
|
||||||
struct sigaction oact;
|
|
||||||
|
|
||||||
if (sigaction(signo, NULL, &oact) < 0)
|
|
||||||
return SIG_ERR;
|
|
||||||
return oact.sa_handler;
|
|
||||||
#endif /* !HAVE_POSIX_SIGNALS */
|
|
||||||
#else
|
|
||||||
return SIG_DFL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.h,v 1.19 2004/12/31 22:03:50 pgsql Exp $
|
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.h,v 1.19.6.1 2006/05/30 15:58:07 tgl Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* This shouldn't be in libpq, but the monitor and some other
|
* This shouldn't be in libpq, but the monitor and some other
|
||||||
@ -24,6 +24,4 @@ typedef void (*pqsigfunc) (int);
|
|||||||
|
|
||||||
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
|
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
|
||||||
|
|
||||||
extern pqsigfunc pqsignalinquire(int signo);
|
|
||||||
|
|
||||||
#endif /* PQSIGNAL_H */
|
#endif /* PQSIGNAL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user