Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Only ENOENT is ignored as it is no error.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
We'll never leave epoll_check_reopen() with epoll_fd == -1.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This calls TALLOC_FREE(ev->additional_data), which is epoll_ev
within epoll_panic() before calling the fallback handler.
In order to notice that a epoll_panic() happened, a caller can
register a pointer to a bool variable under epoll_ev->panic_state.
As epoll_check_reopen() can fail due to a epoll_panic(),
we need to force the replay flag if we have called any event handler.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
This makes sure we only do random panics if a fallback handler
is registered.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
|
|
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
tevent_poll backend.
We might be called during tevent_re_initialise()
which means we need to free our old additional_data.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Can be set externally, allows us to fallback if epoll
fails at runtime.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
A fallback panic handler will need to know if
there was an error while waiting for events
(replay=true) or if the error happened on modify
(replay=false).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
Currently we can't return from this, but the new fallback
code will change this.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
|
|
Set/get a single callback function to be invoked at various trace
points. Define "before wait" and "after wait" trace points - more
trace points can be added later if required.
CTDB wants this to log long waits and events.
Pair-programmed-with: Amitay Isaacs <amitay@gmail.com>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
|
|
If an application using libtevent starts a new process the epoll file descriptor
is leaked to the new process if the event context is not freed explicitly. By
setting FD_CLOEXEC this is not needed anymore.
Signed-off-by: Simo Sorce <idra@samba.org>
|
|
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Feb 17 18:16:18 CET 2011 on sn-devel-104
|
|
these are not supposed to be exposed in the library
|
|
They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.
metze
|
|
tevent_loop_wait should do the same for all backends.
It should loop as long as we have pending events.
metze
|
|
We also check for signal events directly before and after
the select/epoll calls.
metze
|
|
This makes the logic much simpler for the callers,
and matches the samba3 behavior.
If needed we can add performance tunning for tevent_loop_wait()
later.
metze
|
|
metze
|
|
Also add tevent_timeval_add() and tevent_timeval_current_ofs()
to help not depending on lub/util/time.c for things that just need tevent
|
|
metze
|
|
metze
|
|
metze
|
|
This fixes crash bugs... I forgot to commit and squash
this to commit e45ed828d042acca09cb1ed5b6dd7a24eb5e7ffd
metze
|
|
TEVENT_FD_AUTOCLOSE adds a dependency to SOCKET_WRAPPER,
which is bad. Callers should use tevent_fd_set_close_fn() now.
metze
|
|
metze
|
|
Let callers specify a close function
as an alternative to TEVENT_FD_AUTOCLOSE.
metze
|
|
metze
|
|
metze
|
|
And related changes, but we keep compat macros
metze
|
|
metze
|
|
And fix the callers and there init functions.
metze
|
|
metze
|
|
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"
for s in $list; do
o=`echo $s | cut -d ':' -f1`
n=`echo $s | cut -d ':' -f2`
r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
for f in $files; do
cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
mv $f.tmp $f
done
done
metze
|
|
We have compat macros to keep the callers happy.
metze
|
|
metze
|
|
This commit will not compile on its own.
metze
|