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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 01-sa-siginfo-undeclared.dpatch by <paul@nfg.nl>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: fix FTBFS on Hurd due to missing SA_SIGINFO
@DPATCH@
diff -urNad dbmail-2.2.11~/server.c dbmail-2.2.11/server.c
--- dbmail-2.2.11~/server.c 2009-02-02 15:21:55.000000000 +0100
+++ dbmail-2.2.11/server.c 2009-02-02 16:32:12.000000000 +0100
@@ -44,7 +44,7 @@
ChildInfo_t childinfo;
/* some extra prototypes (defintions are below) */
-static void ParentSigHandler(int sig, siginfo_t * info, void *data);
+static void ParentSigHandler(int sig);
static int SetParentSigHandler(void);
static int server_setup(serverConfig_t *conf);
@@ -59,11 +59,11 @@
act.sa_sigaction = ParentSigHandler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = 0;
sact.sa_sigaction = ParentSigHandler;
sigemptyset(&sact.sa_mask);
- sact.sa_flags = SA_SIGINFO | SA_NOCLDSTOP;
+ sact.sa_flags = SA_NOCLDSTOP;
sigaction(SIGCHLD, &sact, 0);
sigaction(SIGINT, &sact, 0);
@@ -329,7 +329,7 @@
return result;
}
-void ParentSigHandler(int sig, siginfo_t * info UNUSED, void *data UNUSED)
+void ParentSigHandler(int sig)
{
int saved_errno = errno;
Restart = 0;
diff -urNad dbmail-2.2.11~/serverchild.c dbmail-2.2.11/serverchild.c
--- dbmail-2.2.11~/serverchild.c 2009-02-02 15:21:55.000000000 +0100
+++ dbmail-2.2.11/serverchild.c 2009-02-02 16:32:12.000000000 +0100
@@ -68,13 +68,13 @@
connected = 0;
}
-void noop_child_sig_handler(int sig, siginfo_t *info UNUSED, void *data UNUSED)
+void noop_child_sig_handler(int sig)
{
if (sig == SIGSEGV)
_exit(0);
}
-void active_child_sig_handler(int sig, siginfo_t * info UNUSED, void *data UNUSED)
+void active_child_sig_handler(int sig)
{
int saved_errno = errno;
@@ -122,11 +122,11 @@
act.sa_sigaction = active_child_sig_handler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = 0;
rstact.sa_sigaction = active_child_sig_handler;
sigemptyset(&rstact.sa_mask);
- rstact.sa_flags = SA_SIGINFO | SA_RESETHAND;
+ rstact.sa_flags = SA_RESETHAND;
sigaddset(&act.sa_mask, SIGINT);
sigaddset(&act.sa_mask, SIGQUIT);
@@ -162,7 +162,7 @@
act.sa_sigaction = noop_child_sig_handler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = 0;
sigaction(SIGINT, &act, 0);
sigaction(SIGQUIT, &act, 0);
diff -urNad dbmail-2.2.11~/serverchild.h dbmail-2.2.11/serverchild.h
--- dbmail-2.2.11~/serverchild.h 2009-02-02 15:21:55.000000000 +0100
+++ dbmail-2.2.11/serverchild.h 2009-02-02 16:32:12.000000000 +0100
@@ -30,8 +30,8 @@
#include "dbmail.h"
-void active_child_sig_handler(int sig, siginfo_t *info, void *data);
-void noop_child_sig_handler(int sig, siginfo_t *info, void *data);
+void active_child_sig_handler(int sig);
+void noop_child_sig_handler(int sig);
int SetChildSigHandler(void);
int DelChildSigHandler(void);
pid_t CreateChild(ChildInfo_t * info);
diff -urNad dbmail-2.2.11~/serverparent.c dbmail-2.2.11/serverparent.c
--- dbmail-2.2.11~/serverparent.c 2009-02-02 15:21:55.000000000 +0100
+++ dbmail-2.2.11/serverparent.c 2009-02-02 16:32:12.000000000 +0100
@@ -47,7 +47,7 @@
int quiet = 0;
static int SetMainSigHandler(void);
-static void MainSigHandler(int sig, siginfo_t * info, void *data);
+static void MainSigHandler(int sig);
static void ClearConfig(serverConfig_t * conf);
static void DoConfig(serverConfig_t * conf, const char * const service);
static void LoadServerConfig(serverConfig_t * config, const char * const service);
@@ -182,7 +182,7 @@
return 0;
}
-void MainSigHandler(int sig, siginfo_t * info UNUSED, void *data UNUSED)
+void MainSigHandler(int sig)
{
mainSig = sig;
@@ -203,7 +203,7 @@
act.sa_sigaction = MainSigHandler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = 0;
sigaction(SIGINT, &act, 0);
sigaction(SIGQUIT, &act, 0);
|