Age | Commit message (Collapse) | Author | Files | Lines |
|
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: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Feb 28 21:10:08 CET 2011 on sn-devel-104
|
|
The s3 libsmbclient puts two different handlers on a single fd for readability
and writability. With select this works fine, however without this patch we
unconditionally call the write handler even if the socket is only readable. We
should have called the read handler instead.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Oct 6 23:40:24 UTC 2010 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
|
|
metze
|
|
And fix the callers and there init functions.
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
|