Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / include / libpq / pqsignal.h
blob8e011a4ea994210255c4d8eb523aef84e18ee7d9
1 /*-------------------------------------------------------------------------
3 * pqsignal.h
4 * prototypes for the reliable BSD-style signal(2) routine.
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 * NOTES
13 * This shouldn't be in libpq, but the monitor and some other
14 * things need it...
16 *-------------------------------------------------------------------------
18 #ifndef PQSIGNAL_H
19 #define PQSIGNAL_H
21 #include <signal.h>
23 #ifdef HAVE_SIGPROCMASK
24 extern sigset_t UnBlockSig,
25 BlockSig,
26 AuthBlockSig;
28 #define PG_SETMASK(mask) sigprocmask(SIG_SETMASK, mask, NULL)
29 #else
30 extern int UnBlockSig,
31 BlockSig,
32 AuthBlockSig;
34 #ifndef WIN32
35 #define PG_SETMASK(mask) sigsetmask(*((int*)(mask)))
36 #else
37 #define PG_SETMASK(mask) pqsigsetmask(*((int*)(mask)))
38 int pqsigsetmask(int mask);
39 #endif
40 #endif
42 typedef void (*pqsigfunc) (int);
44 extern void pqinitmask(void);
46 extern pqsigfunc pqsignal(int signo, pqsigfunc func);
48 #endif /* PQSIGNAL_H */