summaryrefslogtreecommitdiffstats
path: root/lib/tevent/tevent_select.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-16 12:45:48 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-17 19:58:56 +0100
commit0139befb915006d6ec9fec2734057c5c50b3c383 (patch)
tree8219fac1fdbc96b984f2a561634daaf47c62c7d4 /lib/tevent/tevent_select.c
parent3af7db3dce0e5529114f6969e9905c6d4c65dfe8 (diff)
downloadsamba-0139befb915006d6ec9fec2734057c5c50b3c383.tar.gz
samba-0139befb915006d6ec9fec2734057c5c50b3c383.tar.xz
samba-0139befb915006d6ec9fec2734057c5c50b3c383.zip
tevent: check signal events first in event_loop_once
We also check for signal events directly before and after the select/epoll calls. metze
Diffstat (limited to 'lib/tevent/tevent_select.c')
-rw-r--r--lib/tevent/tevent_select.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c
index bbbb95fce8b..b666b4fba4a 100644
--- a/lib/tevent/tevent_select.c
+++ b/lib/tevent/tevent_select.c
@@ -210,6 +210,11 @@ static int select_event_loop_once(struct tevent_context *ev, const char *locatio
struct select_event_context);
struct timeval tval;
+ if (select_ev->ev->signal_events &&
+ tevent_common_check_signal(select_ev->ev)) {
+ return 0;
+ }
+
tval = tevent_common_loop_timer_delay(ev);
if (tevent_timeval_is_zero(&tval)) {
return 0;