1 /*-------------------------------------------------------------------------
4 * Backend signal(2) support (see also src/port/pqsignal.c)
6 * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
9 * src/include/libpq/pqsignal.h
11 *-------------------------------------------------------------------------
19 #define PG_SETMASK(mask) sigprocmask(SIG_SETMASK, mask, NULL)
21 /* Emulate POSIX sigset_t APIs on Windows */
24 extern int pqsigsetmask(int mask);
26 #define PG_SETMASK(mask) pqsigsetmask(*(mask))
27 #define sigemptyset(set) (*(set) = 0)
28 #define sigfillset(set) (*(set) = ~0)
29 #define sigaddset(set, signum) (*(set) |= (sigmask(signum)))
30 #define sigdelset(set, signum) (*(set) &= ~(sigmask(signum)))
33 extern sigset_t UnBlockSig,
37 extern void pqinitmask(void);
39 #endif /* PQSIGNAL_H */