summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch b/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
new file mode 100644
index 0000000000..bd4f7d1d1b
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
@@ -0,0 +1,51 @@
1From 1f54181c2df1fb92c3323a6dbf8273fb66b883b6 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
3 <jeremie.galarneau@efficios.com>
4Date: Sat, 17 Oct 2015 19:41:47 -0400
5Subject: [PATCH] Port: Don't use SIGUNUSED which is not defined on Solaris
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9Organization: O.S. Systems Software LTDA.
10
11Upstream-Status: Backport [2.8.0]
12
13Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
14---
15 src/common/runas.c | 18 +++++-------------
16 1 file changed, 5 insertions(+), 13 deletions(-)
17
18diff --git a/src/common/runas.c b/src/common/runas.c
19index 57f7382..0825470 100644
20--- a/src/common/runas.c
21+++ b/src/common/runas.c
22@@ -530,21 +530,13 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid)
23 static
24 int reset_sighandler(void)
25 {
26- int sig, ret = 0;
27+ int sig;
28
29- for (sig = SIGHUP; sig <= SIGUNUSED; sig++) {
30- /* Skip unblockable signals. */
31- if (sig == SIGKILL || sig == SIGSTOP) {
32- continue;
33- }
34- if (signal(sig, SIG_DFL) == SIG_ERR) {
35- PERROR("reset signal %d", sig);
36- ret = -1;
37- goto end;
38- }
39+ DBG("Resetting run_as worker signal handlers to default");
40+ for (sig = 1; sig <= 31; sig++) {
41+ (void) signal(sig, SIG_DFL);
42 }
43-end:
44- return ret;
45+ return 0;
46 }
47
48 static
49--
502.6.2
51