#include "postgres_fe.h"
#include <signal.h>
Go to the source code of this file.
◆ pqsignal()
Definition at line 42 of file legacy-pqsignal.c.
43{
44#ifndef WIN32
45 struct sigaction act,
46 oact;
47
48 act.sa_handler = func;
49 sigemptyset(&act.sa_mask);
50 act.sa_flags = 0;
52 act.sa_flags |= SA_RESTART;
53#ifdef SA_NOCLDSTOP
55 act.sa_flags |= SA_NOCLDSTOP;
56#endif
57 if (sigaction(signo, &act, &oact) < 0)
58 return SIG_ERR;
59 return oact.sa_handler;
60#else
61 return signal(signo, func);
62#endif
63}