[pgsql@localhost tst]$ cat sig01.c
#include <stdio.h>
#include <signal.h> static void
trapsigterm(int signum)
{
fprintf(stderr,"+++++++++++Got SIGTERM with %d\n",signum);
} static void
trapsigquit(int signum) {
fprintf(stderr,"+++++++++++Got SIGQUIT with %d\n",signum);
} int main()
{ signal(SIGTERM,trapsigterm);
signal(SIGQUIT,trapsigquit); sleep(); return ; }
[pgsql@localhost tst]$