summaryrefslogtreecommitdiff
path: root/lib/tevent/tevent_signal.c
AgeCommit message (Collapse)AuthorFilesLines
2011-08-01Fix bug 7462 - Non-standard SA_RESETHAND is used in ↵Jeremy Allison1-0/+4
...lib/tevent/tevent_signal.c Make SA_RESETHAND conditional on its existance. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Aug 1 22:03:45 CEST 2011 on sn-devel-104
2010-10-08tevent: Do not use talloc_autofree_contextVolker Lendecke1-1/+1
2010-02-09s3: signals are processed twice in child.Bo Yang1-5/+28
Signed-off-by: Bo Yang <boyang@samba.org>
2009-12-20tevent: prefix types and defined with tevent_ and TEVENT_Stefan Metzmacher1-37/+39
This fixes the build warnings on some build-farm hosts. metze
2009-10-01NULL is not a valid event context.Jeremy Allison1-1/+1
Jeremy.
2009-09-22lib/tevent: a cleaner fix for be4ac227842530d484659f2db683453366326d8b segvRusty Russell1-7/+1
Revert 23abcd2318c69753aa2a144e1dc0f9cf9efdb705 and fix logic bug. The current code loops through the event contexts, when it sees a different one, it notifies the current one (ev) and updates ev to point to the new one. This is dumb, because: (1) ev starts as NULL, so this code crashes, and (2) The final context will not be notified. The correct fix for this is to update ev to the new one, then notify it. Volker's fix works because we currently always have one event context. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-09-21tevent: make sure we don't set errno within the signal handler function.Stefan Metzmacher1-0/+3
metze
2009-09-03Another part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison1-2/+6
SA_INFO_QUEUE_COUNT *MUST* be a power of 2, in order for the ring buffer wrap to work correctly at the 32 bit boundary. Thanks to Petr Vandrovec <petr@vandrovec.name> for this.
2009-08-29tevent: Fix a segfault upon the first signalVolker Lendecke1-0/+6
When the first signal arrives, tevent_common_signal_handler() crashed: "ev" is initialized to NULL, so the first "write(ev->pipe_fds[1], &c, 1);" dereferences NULL. Rusty, Tridge, please check. Also, can you tell me a bit more about the environment you tested this in? I'd be curious to see where this survived. Thanks, Volker
2009-08-28lib/tevent: handle tevent_common_add_signal on different event contexts.Rusty Russell1-14/+30
I don't know if this is a problem in real life. The code assumes there's only one tevent_context; all signals will notify the first event context. That's counter-intuitive if you ever use more than one, and there's nothing else in this code which prevents it AFAICT. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-08-28lib/tevent: fix race with signals and tevent_common_add_signalRusty Russell1-20/+20
We carefully preserve the old signal handler, but we replace it before we've set up everything; in particular, if we fail setting up the pipe_hack we could write a NUL char to stdout (fd 0), instead of calling the old signal handler. Replace the signal handler as the very last thing we do. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-08-28lib/tevent: remove spectacularly complicated manual subtractionRusty Russell1-4/+1
To be completely honest, I don't quite know whether to laugh or cry at this one: 1 + (0xFFFFFFFF & ~(s.seen - s.count)) == 1 + (~(s.seen - s.count)) # s.seen, s.count are uint32_t == s.count - s.seen # -A == ~A + 1 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2009-08-24tevent: avoid using reserved c++ word.Günther Deschner1-1/+1
Guenther
2009-08-21Fix for bug 6651 - smbd SIGSEGV when breaking oplocks.Jeremy Allison1-17/+54
Based on a patch submitted by Petr Vandrovec <petr@vandrovec.name>. Multiple pending signals with siginfo_t's weren't being handled correctly leading to smbd abort with kernel oplock signals. Jeremy
2009-02-16lib/tevent: change to LGPLv3+Stefan Metzmacher1-12/+16
metze
2009-02-14Fix a warning and a bug: pipe(2) can failVolker Lendecke1-1/+4
2009-02-14Add two variable assignments to shut up gccVolker Lendecke1-2/+4
2009-01-27tevent: change SA_INFO_QUEUE_COUNT from 10 to 100Stefan Metzmacher1-1/+1
The samba3 aio code requires lp_max_mux() with a default of 50 and the samba3 linux oplock code requires 100. May we could make the size dynamic later. metze
2009-01-20tevent: rename signal handler functions to start with tevent_common_Stefan Metzmacher1-5/+6
This makes debugging with gdb easier. metze
2009-01-05tevent: keep a linked list of signal eventsStefan Metzmacher1-8/+44
metze
2009-01-02tevent: pass down handler_name and location to the backend layerStefan Metzmacher1-18/+23
metze
2009-01-02tevent: use libreplace headers instead of system headersStefan Metzmacher1-2/+1
metze
2008-12-29s4:lib/tevent: rename structsStefan Metzmacher1-3/+3
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
2008-12-17s4:lib/tevent: add lib/events/ compat and let things compileStefan Metzmacher1-3/+3
metze
2008-12-17s4:lib/events: move to toplevel directory as lib/tevent/Stefan Metzmacher1-0/+291
This commit will not compile on its own. metze