summaryrefslogtreecommitdiff
path: root/include/sig.h
blob: 2c44e9a560935048d72a8c19302b5784a2455b59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef SIG_H
#define SIG_H

/*
 * Revision 20160714, Kai Peter
 * - updated some declarations no new(er) one's from ucspi-tcp-0.88
 * Revision 20240714, JMH
 * - added best effort parameter types
 */

// new(er) declarations from ucspi-tcp-0.88:
extern int sig_alarm;
extern int sig_child;
extern int sig_cont;
extern int sig_hangup;
extern int sig_pipe;
extern int sig_term;

extern void (*sig_defaulthandler)(int);
extern void (*sig_ignorehandler)(int);

extern void sig_catch(int, void (*)(int));
#define sig_ignore(s)  (sig_catch((s), sig_ignorehandler))
#define sig_uncatch(s) (sig_catch((s), sig_defaulthandler))

extern void sig_block(int);
extern void sig_unblock(int);
extern void sig_blocknone(void);
extern void sig_pause(void);

extern void sig_dfl(int);

// declaration of (net)qmail package
extern void sig_miscignore(void);
extern void sig_bugcatch(void (*)(int));

extern void sig_pipeignore(void);
extern void sig_pipedefault(void);

extern void sig_contblock(void);
extern void sig_contunblock(void);
extern void sig_contcatch(void (*)(void));
extern void sig_contdefault(void);

extern void sig_termblock(void);
extern void sig_termunblock(void);
extern void sig_termcatch(void (*)(void));
extern void sig_termdefault(void);

extern void sig_alarmblock(void);
extern void sig_alarmunblock(void);
extern void sig_alarmcatch(void (*)(void));
extern void sig_alarmdefault(void);

extern void sig_childblock(void);
extern void sig_childunblock(void);
extern void sig_childcatch(void (*)(void));
extern void sig_childdefault(void);

extern void sig_hangupblock(void);
extern void sig_hangupunblock(void);
extern void sig_hangupcatch(void (*)(void));
extern void sig_hangupdefault(void);

#endif