leafnode  1.12.0
About: Leafnode is a store & forward NNTP proxy for small (dialup) sites.
  Fossies Dox: leafnode-1.12.0.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

mysigact.c
Go to the documentation of this file.
1/* (C) Copyright 2002 - 2010 Matthias Andree, see COPYING for license. */
2
3#include "leafnode.h"
4
5#include "config.h"
6#include <signal.h>
7#include "mysigact.h"
8
9int mysigact(int sig, int flags, void (* func)(int), int blockthis)
10{
11 struct sigaction sa;
12
13 sa.sa_handler = func;
14 sa.sa_flags = SA_NOCLDSTOP | flags;
15 sigemptyset(&sa.sa_mask);
16 if (blockthis)
17 sigaddset(&sa.sa_mask, blockthis);
18 return sigaction(sig, &sa, (struct sigaction *)0);
19}
int mysigact(int sig, int flags, void(*func)(int), int blockthis)
Definition: mysigact.c:9