summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-12 08:48:59 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-12 12:04:31 +0100
commit43a7d48d24b357872dc31c1088e468ad2b719b73 (patch)
tree5c977418b11016290169ce933c025711fd66b260 /lib
parent7a8b97ec2bcedb18b56b54fbf61eb0d6e9005193 (diff)
downloadsamba-43a7d48d24b357872dc31c1088e468ad2b719b73.tar.gz
samba-43a7d48d24b357872dc31c1088e468ad2b719b73.tar.bz2
samba-43a7d48d24b357872dc31c1088e468ad2b719b73.zip
tevent: add tevent_signal_support()
Not every tevent backend supports signal events. metze
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent.c8
-rw-r--r--lib/tevent/tevent.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index fc8252960a..fd273afb66 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -305,6 +305,14 @@ void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags)
fde->event_ctx->ops->set_fd_flags(fde, flags);
}
+bool tevent_signal_support(struct tevent_context *ev)
+{
+ if (ev->ops->add_signal) {
+ return true;
+ }
+ return false;
+}
+
/*
add a timer event
return NULL on failure
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 2dadfc1abe..1f4cf2d329 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -108,6 +108,8 @@ void tevent_fd_set_auto_close(struct tevent_fd *fde);
uint16_t tevent_fd_get_flags(struct tevent_fd *fde);
void tevent_fd_set_flags(struct tevent_fd *fde, uint16_t flags);
+bool tevent_signal_support(struct tevent_context *ev);
+
/* bits for file descriptor event flags */
#define TEVENT_FD_READ 1
#define TEVENT_FD_WRITE 2