diff options
Diffstat (limited to 'src/libstddjb/selfpipe_internal.c')
-rw-r--r-- | src/libstddjb/selfpipe_internal.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libstddjb/selfpipe_internal.c b/src/libstddjb/selfpipe_internal.c index f65e07a..34bdd51 100644 --- a/src/libstddjb/selfpipe_internal.c +++ b/src/libstddjb/selfpipe_internal.c @@ -3,6 +3,7 @@ /* MT-unsafe */ #include <signal.h> + #include <skalibs/sysdeps.h> #include "selfpipe-internal.h" @@ -14,18 +15,16 @@ int selfpipe_fd = -1 ; #else -#include <errno.h> +#include <unistd.h> + #include <skalibs/allreadwrite.h> -#include <skalibs/djbunix.h> int selfpipe[2] = { -1, -1 } ; -static void selfpipe_trigger (int s) +void selfpipe_tophalf (int s) { unsigned char c = (unsigned char)s ; - fd_write(selfpipe[1], (char *)&c, 1) ; + write(selfpipe[1], (char *)&c, 1) ; } -struct skasigaction const selfpipe_ssa = { &selfpipe_trigger, SKASA_NOCLDSTOP | SKASA_MASKALL } ; - #endif |