ucspi-ssl  0.99e
TLS encryption for IPv6 communication
sig_catch.c
Go to the documentation of this file.
1 /* Public domain. */
2 
3 #include <signal.h>
4 #include "sig.h"
5 #include "hassgact.h"
6 
7 void sig_catch(int sig,void (*f)())
8 {
9 #ifdef HASSIGACTION
10  struct sigaction sa;
11  sa.sa_handler = f;
12  sa.sa_flags = 0;
13  sigemptyset(&sa.sa_mask);
14  sigaction(sig,&sa,(struct sigaction *) 0);
15 #else
16  signal(sig,f); /* won't work under System V, even nowadays---dorks */
17 #endif
18 }
void sig_catch(int sig, void(*f)())
Definition: sig_catch.c:7