Skip to content

Commit 03f9636

Browse files
committed
Remove pqsignalinquire(), which is unused and has portability issues.
1 parent d898de1 commit 03f9636

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

src/interfaces/libpq/pqsignal.c

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.25 2006/03/05 15:59:10 momjian Exp $
12+
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.c,v 1.26 2006/05/30 15:57:56 tgl Exp $
1313
*
1414
* NOTES
1515
* This shouldn't be in libpq, but the monitor and some other
@@ -44,29 +44,3 @@ pqsignal(int signo, pqsigfunc func)
4444
return oact.sa_handler;
4545
#endif /* !HAVE_POSIX_SIGNALS */
4646
}
47-
48-
pqsigfunc
49-
pqsignalinquire(int signo)
50-
{
51-
#ifndef WIN32
52-
#if !defined(HAVE_POSIX_SIGNALS)
53-
pqsigfunc old_sigfunc;
54-
int old_sigmask;
55-
56-
/* Prevent signal handler calls during test */
57-
old_sigmask = sigblock(sigmask(signo));
58-
old_sigfunc = signal(signo, SIG_DFL);
59-
signal(signo, old_sigfunc);
60-
sigblock(old_sigmask);
61-
return old_sigfunc;
62-
#else
63-
struct sigaction oact;
64-
65-
if (sigaction(signo, NULL, &oact) < 0)
66-
return SIG_ERR;
67-
return oact.sa_handler;
68-
#endif /* !HAVE_POSIX_SIGNALS */
69-
#else
70-
return SIG_DFL;
71-
#endif
72-
}

src/interfaces/libpq/pqsignal.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.h,v 1.20 2006/03/05 15:59:10 momjian Exp $
10+
* $PostgreSQL: pgsql/src/interfaces/libpq/pqsignal.h,v 1.21 2006/05/30 15:57:56 tgl Exp $
1111
*
1212
* NOTES
1313
* This shouldn't be in libpq, but the monitor and some other
@@ -24,6 +24,4 @@ typedef void (*pqsigfunc) (int);
2424

2525
extern pqsigfunc pqsignal(int signo, pqsigfunc func);
2626

27-
extern pqsigfunc pqsignalinquire(int signo);
28-
2927
#endif /* PQSIGNAL_H */

0 commit comments

Comments
 (0)