Skip to content
Snippets Groups Projects
Commit 6ce5dd5e authored by Dan Egnor's avatar Dan Egnor
Browse files

Rearrange deck chairs

parent 1eb28c29
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ case "$host" in
;;
esac
AC_CHECK_HEADERS(poll.h sys/select.h)
AC_CHECK_HEADERS(poll.h sys/select.h sys/socket.h)
AC_CHECK_LIB(adns,adns_init,[
ADNS_LIBS="-ladns"
......
......@@ -9,6 +9,7 @@
#include <assert.h>
#include <signal.h>
#include <unistd.h>
#include <fcntl.h>
#define MAGIC 5131
......@@ -21,7 +22,7 @@ struct sig_handler {
struct sig_signal {
struct sig_handler *list,*ptr;
struct sigaction old;
int active;
volatile sig_atomic_t active;
};
struct oop_adapter_signal {
......@@ -195,6 +196,11 @@ oop_adapter_signal *oop_signal_new(oop_source *source) {
return NULL;
}
fcntl(s->pipefd[0],F_SETFD,FD_CLOEXEC);
fcntl(s->pipefd[1],F_SETFD,FD_CLOEXEC);
fcntl(s->pipefd[0],F_SETFL,O_NONBLOCK);
fcntl(s->pipefd[1],F_SETFL,O_NONBLOCK);
s->oop.on_fd = sig_on_fd;
s->oop.cancel_fd = sig_cancel_fd;
s->oop.on_time = sig_on_time;
......
......@@ -19,6 +19,10 @@
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
#define MAGIC 0x9643
struct sys_time {
......@@ -37,7 +41,7 @@ struct sys_signal_handler {
struct sys_signal {
struct sys_signal_handler *list,*ptr;
struct sigaction old;
int active;
volatile sig_atomic_t active;
};
struct sys_file_handler {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment