xref: /netbsd-src/external/ibm-public/postfix/dist/src/util/posix_signals.h (revision 41fbaed053f8fbfdf9d2a4ee0a7386a3c83f8505)
1*41fbaed0Stron /*	$NetBSD: posix_signals.h,v 1.1.1.1 2009/06/23 10:09:00 tron Exp $	*/
2*41fbaed0Stron 
3*41fbaed0Stron #ifndef _POSIX_SIGNALS_H_INCLUDED_
4*41fbaed0Stron #define _POSIX_SIGNALS_H_INCLUDED_
5*41fbaed0Stron /*++
6*41fbaed0Stron /* NAME
7*41fbaed0Stron /*	posix_signals 3h
8*41fbaed0Stron /* SUMMARY
9*41fbaed0Stron /*	POSIX signal handling compatibility
10*41fbaed0Stron /* SYNOPSIS
11*41fbaed0Stron /*	#include <posix_signals.h>
12*41fbaed0Stron /* DESCRIPTION
13*41fbaed0Stron /* .nf
14*41fbaed0Stron 
15*41fbaed0Stron  /*
16*41fbaed0Stron   * Compatibility interface.
17*41fbaed0Stron   */
18*41fbaed0Stron 
19*41fbaed0Stron #ifdef MISSING_SIGSET_T
20*41fbaed0Stron 
21*41fbaed0Stron typedef int sigset_t;
22*41fbaed0Stron 
23*41fbaed0Stron enum {
24*41fbaed0Stron     SIG_BLOCK,
25*41fbaed0Stron     SIG_UNBLOCK,
26*41fbaed0Stron     SIG_SETMASK
27*41fbaed0Stron };
28*41fbaed0Stron 
29*41fbaed0Stron extern int sigemptyset(sigset_t *);
30*41fbaed0Stron extern int sigaddset(sigset_t *, int);
31*41fbaed0Stron extern int sigprocmask(int, sigset_t *, sigset_t *);
32*41fbaed0Stron 
33*41fbaed0Stron #endif
34*41fbaed0Stron 
35*41fbaed0Stron #ifdef MISSING_SIGACTION
36*41fbaed0Stron 
37*41fbaed0Stron struct sigaction {
38*41fbaed0Stron     void    (*sa_handler) ();
39*41fbaed0Stron     sigset_t sa_mask;
40*41fbaed0Stron     int     sa_flags;
41*41fbaed0Stron };
42*41fbaed0Stron 
43*41fbaed0Stron  /* Possible values for sa_flags.  Or them to set multiple.  */
44*41fbaed0Stron enum {
45*41fbaed0Stron     SA_RESTART,
46*41fbaed0Stron     SA_NOCLDSTOP = 4			/* drop the = 4.  */
47*41fbaed0Stron };
48*41fbaed0Stron 
49*41fbaed0Stron extern int sigaction(int, struct sigaction *, struct sigaction *);
50*41fbaed0Stron 
51*41fbaed0Stron #endif
52*41fbaed0Stron 
53*41fbaed0Stron /* AUTHOR(S)
54*41fbaed0Stron /*	Pieter Schoenmakers
55*41fbaed0Stron /*	Eindhoven University of Technology
56*41fbaed0Stron /*	P.O. Box 513
57*41fbaed0Stron /*	5600 MB Eindhoven
58*41fbaed0Stron /*	The Netherlands
59*41fbaed0Stron /*--*/
60*41fbaed0Stron 
61*41fbaed0Stron #endif
62