| changeset 0 | 068428edee47 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sig_catch.c Fri Oct 19 14:06:22 2007 +0200 @@ -0,0 +1,18 @@ +#include <signal.h> +#include "sig.h" +#include "hassgact.h" + +void sig_catch(sig,f) +int sig; +void (*f)(); +{ +#ifdef HASSIGACTION + struct sigaction sa; + sa.sa_handler = f; + sa.sa_flags = 0; + sigemptyset(&sa.sa_mask); + sigaction(sig,&sa,(struct sigaction *) 0); +#else + signal(sig,f); /* won't work under System V, even nowadays---dorks */ +#endif +}