blob: ddd1116aa26a9beeae4e605eb205e772dba5f871 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* ISC license. */
#include <errno.h>
#include <signal.h>
#include <skalibs/sig.h>
#include <s6/ftrigw.h>
int ftrigw_notifyb (char const *path, char const *s, unsigned int len)
{
struct skasigaction old ;
int r ;
if (skasigaction(SIGPIPE, &SKASIG_IGN, &old) < 0) return -1 ;
r = ftrigw_notifyb_nosig(path, s, len) ;
{
int e = errno ;
skasigaction(SIGPIPE, &old, 0) ;
errno = e ;
}
return r ;
}
|