summaryrefslogtreecommitdiff
path: root/src/libs6/ftrigw_notifyb.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-08-09 23:42:35 +0000
committerLaurent Bercot <ska@appnovation.com>2021-08-09 23:42:35 +0000
commitaaea6322e9e765969f452764e51ca1ddd9783264 (patch)
tree4e863537677e0266a79c4045c47a5e6b9f64a1a8 /src/libs6/ftrigw_notifyb.c
parentce2977ee9195612730bc8713f142c95f79605e75 (diff)
downloads6-aaea6322e9e765969f452764e51ca1ddd9783264.tar.xz
skalibs-2.11.0.0 API change
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libs6/ftrigw_notifyb.c')
-rw-r--r--src/libs6/ftrigw_notifyb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libs6/ftrigw_notifyb.c b/src/libs6/ftrigw_notifyb.c
index ee5c74c..107a760 100644
--- a/src/libs6/ftrigw_notifyb.c
+++ b/src/libs6/ftrigw_notifyb.c
@@ -2,18 +2,20 @@
#include <errno.h>
#include <signal.h>
-#include <skalibs/sig.h>
+
#include <s6/ftrigw.h>
int ftrigw_notifyb (char const *path, char const *s, size_t len)
{
- struct skasigaction old ;
+ struct sigaction old ;
+ struct sigaction action = { .sa_handler = SIG_IGN, .sa_flags = SA_RESTART | SA_NOCLDSTOP } ;
int r ;
- if (skasigaction(SIGPIPE, &SKASIG_IGN, &old) < 0) return -1 ;
+ sigfillset(&action.sa_mask) ;
+ if (sigaction(SIGPIPE, &action, &old) == -1) return -1 ;
r = ftrigw_notifyb_nosig(path, s, len) ;
{
int e = errno ;
- skasigaction(SIGPIPE, &old, 0) ;
+ sigaction(SIGPIPE, &old, 0) ;
errno = e ;
}
return r ;