0
0
mirror of https://github.com/openwrt/packages.git synced 2025-01-31 03:41:44 +00:00
packages/net/open-isns/patches/20-signals.patch
Ilya Lipnitskiy 5d8d4fbbcb treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

40 lines
920 B
Diff

From e7dac76ce61039fefa58985c955afccb60dabe87 Mon Sep 17 00:00:00 2001
From: Rosen Penev <rosenp@gmail.com>
Date: Wed, 29 Apr 2020 15:55:55 -0700
Subject: [PATCH] libisns: remove sighold and sigrelse
The man page says that these are deprecated. Use sugprocmask as a replacement.
---
include/libisns/util.h | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
--- a/include/libisns/util.h
+++ b/include/libisns/util.h
@@ -41,14 +41,22 @@ char * print_size(unsigned long);
*/
static inline void signals_hold(void)
{
- sighold(SIGTERM);
- sighold(SIGINT);
+ sigset_t s;
+
+ sigemptyset(&s);
+ sigaddset(&s, SIGTERM);
+ sigaddset(&s, SIGINT);
+ sigprocmask(SIG_BLOCK, &s, 0);
}
static inline void signals_release(void)
{
- sigrelse(SIGTERM);
- sigrelse(SIGINT);
+ sigset_t s;
+
+ sigemptyset(&s);
+ sigaddset(&s, SIGTERM);
+ sigaddset(&s, SIGINT);
+ sigprocmask(SIG_UNBLOCK, &s, 0);
}
/*