|
7ad90f6a
|
2010-10-09T00:02:31
|
|
Merge branch '20_internal_prio'
|
|
5b7a3706
|
2010-10-05T14:29:48
|
|
Fix warnings on mingw with gcc 4.5
|
|
90651b32
|
2010-09-17T00:24:50
|
|
Put internal events at highest priority
(If we allow user events to starve internal events, then internal events
never actually happen, signals don't get acked, etc)
|
|
38d09606
|
2010-09-15T12:50:31
|
|
Remove event_base.evsigbase; nothing used it.
|
|
4858b794
|
2010-09-15T01:54:51
|
|
Remove the now-useless evsig_caught and evsig_process
|
|
95a7d418
|
2010-09-15T01:40:02
|
|
Make default signal backend fully threadsafe
Jason Toffaletti discovered with helgrind that our signal handler was
messing with evsig_base, which can be set from lots of places in the
code. Ordinarly, we'd just stick a lock on it, except that it is
illegal (and genuinely error-prone) to call pthread_mutex_acquire()
from inside a signal handler.
The solution is to only store the fd we write to in a static variable,
write the signal number to the fd, and put evsig_cb in charge of
activating signal events.
I have no idea how we'll cope if we want to enable this to handle
siginfo (where available) in the future.
|
|
720bd933
|
2010-09-15T01:08:39
|
|
Warn when using the error-prone EV_SIGNAL interface in an error-prone way. Also, fix a couple of race conditions in signal.c
When using the signal.c signal backend, Libevent currently only allows
one event_base to actually receive signals at a time. (This has been
the behavior since at least 1.4 and probably much earlier.) Now, we
detect and warn if you're likely to be racing about which signal goes
to which thread.
We also add a lock to control modifications of the evsig_base field,
to avoid race conditions like those found by Jason Toffaletti.
Also, more comments. Comments are good.
|
|
47882773
|
2010-09-02T13:21:17
|
|
Fix pointer-to-__cdecl-function syntax
|
|
f0056d04
|
2010-09-02T12:06:58
|
|
Declare signal handler function as "__cdecl" on Windows.
I swear, they must have half a dozen different calling conventions.
(goes to check)
Holy crud. They actually do. There's __cdecl, __stdcall, __fastcall,
"thiscall", "naked" and the obsolete "__pascal", "__fortran", and
"__syscall". And don't forget WINAPI and __far.
Anyways, this should fix 3044488 if I got it right.
|
|
970e6ad2
|
2010-08-19T14:00:06
|
|
Avoid deadlock when activating signals.
Fixes bug 3048812.
Based on patch by Nicholas Marriott.
|
|
ec347b92
|
2010-07-07T16:45:03
|
|
Move event-config.h to include/event2
This change means that all required include files are in event2, and
all files not in event2/* are optional.
|
|
b84b598e
|
2010-04-21T01:15:19
|
|
Clean up properly when adding a signal handler fails.
Previously, when a signation() or signal() call failed, we would free
the element we added to sh_old, but not actually clear the pointer.
This would leave a dangling pointer in sh_old that could cause a
crash later.
|
|
899c1dcc
|
2010-04-14T15:42:57
|
|
Replace EVUTIL_CLOSESOCKET macro with a function
The EVUTIL_CLOSESOCKET() macro required you to include unistd.h in your
source for POSIX. We might as well turn it into a function: an extra
function call is going to be cheap in comparison with the system call.
We retain the EVUTIL_CLOSESOCKET() macro as an alias for the new
evutil_closesocket() function.
(commit message from email by Nick and Sebastian)
|
|
17efc1cd
|
2010-03-04T01:25:51
|
|
Update all our copyright notices to say "2010"
|
|
e5bbd40a
|
2010-02-18T17:41:15
|
|
Clean up formatting: use tabs, not 8-spaces, to indent.
|
|
a19b4a05
|
2010-01-25T13:38:07
|
|
Call event_debug_unassign on internal events
I don't expect that many users will be so religious about calling
unassign, but we need to be so that it's at least possible to use
debug mode without eating memory.
|
|
d0939d2b
|
2009-12-29T16:21:26
|
|
Introduced evutil_make_socket_closeonexec() to preserve fd flags for F_SETFD.
Use this to eliminate the various macros that called F_SETFD throughout
the code.
|
|
e1ffbb82
|
2009-11-21T01:11:49
|
|
Fix memory-leak of signal handler array with kqueue.
It turns out that kqueue_dealloc wasn't calling evsig_dealloc()
(because it doesn't use the main signal handler logic) so the sh_old
array was leaking.
This patch also introduces a fix in evsig_dealloc() where we set
the sh_old array to NULL when we free it, so that main/fork can pass.
|
|
784b8773
|
2009-11-06T21:46:57
|
|
We do not work any more without an event-config.h; stop pretending that it is meaningful to check for HAVE_CONFIG_H
svn:r1516
|
|
2e36dbe1
|
2009-10-26T20:00:43
|
|
Use EVUTIL_ASSERT() consistently instead of assert.
svn:r1464
|
|
0b22ca19
|
2009-05-22T19:11:48
|
|
Use ev_ssize_t in place of ssize_t *everywhere*.
svn:r1309
|
|
7a844735
|
2009-05-22T17:20:05
|
|
Fix some small win32 build issues on trunk.
svn:r1306
|
|
8c66eb2e
|
2009-05-22T14:48:40
|
|
Try to contain the failure when we are running without socketpair().
Some win32 systems (mostly those using Kaspersky, it would seem)
prevent us from faking socketpair(). This makes our signal
notification code just not work. Our response since 1.4 has been to
assert. For users who would rather work without signals than not work
at all, this has been a regression from 1.3e.
This patch makes adding signal events fail in this case; there's no
reason to kill the whole process.
svn:r1303
|
|
d3fbe7fa
|
2009-04-21T18:47:53
|
|
Do not free the signal index unless it was at some point allocated
svn:r1217
|
|
b85b710c
|
2009-01-27T22:34:36
|
|
Update copyright statements to reflect the facts that:
a) this is 2009
b) niels and nick have been comaintainers for a while
c) saying "all rights reserved" when you then go on to explicitly
disclaim some rights is sheer cargo-cultism.
svn:r1065
|
|
8889a770
|
2009-01-27T22:30:46
|
|
Replace all use of config.h with event-config.h.
svn:r1064
|
|
9993137c
|
2009-01-27T21:10:31
|
|
Remove all trailing whitespace in all the source files.
svn:r1063
|
|
fe72c885
|
2009-01-22T06:23:14
|
|
fix signal processing for non-kqueue backends; when a signal callback delivers a signal; from Alexander Drozdov
svn:r1035
|
|
ed7e0e77
|
2009-01-19T23:40:11
|
|
bug fix and potentital race condition from Alexander Drozdov
svn:r1025
|
|
554e1493
|
2009-01-14T20:52:32
|
|
Move per-fd info from eventops into evmap. Not done for win32.c yet.
svn:r1008
|
|
169321c9
|
2009-01-13T20:26:37
|
|
Rename four internal headers to follow the -internal.h convention.
svn:r1000
|
|
8a724410
|
2009-01-12T05:22:29
|
|
make it compile with USE_DEBUG again; reported by Alexander Drozdov
svn:r990
|
|
d776f846
|
2008-12-23T22:23:37
|
|
deprecate the usage of signal_{add,del,set} and name it evsignal_{add,del,set} instead; move the old definitions to compat
svn:r973
|
|
02b2b4d1
|
2008-12-23T16:37:01
|
|
Restructure the event backends so that they do not need to keep track of events themselves, as a side effect multiple events can use the same fd or signal.
svn:r972
|
|
fded0a87
|
2008-09-05T16:47:04
|
|
Fix compilation of recent error code with win32.
svn:r937
|
|
de069b99
|
2008-09-05T16:29:56
|
|
On win32, errno is not the last socket error. Worse, WSAGetLastError() is not the last socket error sometimes (i.e., EWOULDBLOCK). Also, strerror() does not handle winsock errors. Therefore, event_err() and event_warn() are completely wrong for windows socket errors. Fix that.
svn:r936
|
|
e67a5ea9
|
2008-07-25T00:19:15
|
|
fix a problem with epoll and event_reinit; reported by Alexander Drozdov
svn:r917
|
|
1c164ceb
|
2008-07-19T23:35:29
|
|
restore signal handlers correctly when we deallocate the signal base
svn:r913
|
|
4bf44654
|
2008-07-11T16:04:07
|
|
assert(a & b) -> assert(a && b)
svn:r903
|
|
f7e61870
|
2008-07-11T15:49:04
|
|
support multiple events listening on the same signal; make signals regular events that go on the same event queue
svn:r901
|
|
7868ab5a
|
2008-05-09T04:00:17
|
|
r19667@catbus: nickm | 2008-05-08 23:49:26 -0400
fwd-port: Always include winsock2.h before windows.h. Apparently some SDKs need this.
svn:r803
|
|
8c750eaf
|
2008-05-03T21:37:33
|
|
separate signal events from io events
svn:r760
|
|
5fbc7f0a
|
2008-05-02T16:28:25
|
|
r15439@tombo: nickm | 2008-05-02 12:28:08 -0400
use event_assign internall; switch uses of event_set to use event_assign instead.
svn:r755
|
|
49868b61
|
2008-04-25T01:18:08
|
|
r15316@tombo: nickm | 2008-04-24 20:58:36 -0400
Rename internal memory management functions from event_malloc() etc to mm_malloc() etc.
svn:r725
|
|
0ac73078
|
2008-04-16T20:01:51
|
|
r15193@tombo: nickm | 2008-04-16 16:00:35 -0400
Split event.h into several new headers in include/event2. event.h is now just a wrapper that includes all the subheaders.
svn:r711
|
|
3206bbca
|
2007-12-06T18:12:56
|
|
r15171@tombo: nickm | 2007-12-06 12:47:47 -0500
Use GCC attributes (where available) to verify printf type-correctness. Fix some bugs this turned up.
svn:r573
|
|
1120f04f
|
2007-11-25T21:53:06
|
|
r16731@catbus: nickm | 2007-11-25 16:52:53 -0500
Replace all fds on non-unix-specific APIs with evutil_socket_t, which is int on unix and intptr_t on win32.
svn:r552
|
|
ab010e16
|
2007-11-25T21:32:15
|
|
r14952@tombo: nickm | 2007-11-25 14:47:45 -0500
Fix an unused variable warning.
svn:r549
|
|
fa95fe46
|
2007-11-25T21:28:43
|
|
r16704@catbus: nickm | 2007-11-19 15:58:54 -0500
Check return value of event_add in signal.c
svn:r546
|
|
2823cb05
|
2007-11-25T17:15:28
|
|
r14944@tombo: nickm | 2007-11-25 12:12:28 -0500
Make kqueue pass more unit tests.
svn:r544
|
|
7eb250e9
|
2007-11-25T17:14:19
|
|
r14939@tombo: nickm | 2007-11-25 11:59:26 -0500
New function event_set_mem_functions to replace internal calls to malloc, free, etc with a user-supplied functions.
svn:r541
|
|
56934d5d
|
2007-11-13T17:36:58
|
|
debug cleanups in signal.c; from Christopher Layne
svn:r527
|
|
321dfd55
|
2007-11-10T05:18:17
|
|
r16585@catbus: nickm | 2007-11-10 00:16:11 -0500
Patch from Christopher Layne: Make event_del() restore previous signal handlers, not the default.
svn:r506
|
|
4e1ec3e0
|
2007-11-07T21:01:26
|
|
Make all the C files in the libraries compile under MSVC 2005 Express. There are still a few warnings, and probably some subtle issues, but it's better than nothing.
svn:r499
|
|
2026b215
|
2007-11-03T23:53:49
|
|
remove last vestiges of RBTREE
svn:r470
|
|
f0e06d75
|
2007-09-20T18:26:46
|
|
r15217@catbus: nickm | 2007-09-20 14:04:32 -0400
Fix win32 signals: teach win32 that we have per-base signal queues; teach signal.c that not everybody has sigaction().
svn:r442
|
|
41b7cbc3
|
2007-03-10T06:37:53
|
|
more the signal base into the event base; this removes global state and makes signals
work better with threading; from Wouter Wijngaards
small fixes for kqueue and style by me
svn:r351
|
|
b5d2f9a2
|
2007-03-01T06:25:18
|
|
rolling back r339: evconfig.h does not work
svn:r341
|
|
8d94bd03
|
2007-02-28T04:29:18
|
|
signal fixes from scott lamb
svn:r340
|
|
127c260b
|
2007-02-28T04:02:29
|
|
make evconfig.h available as installed header file; not
really ideal but good enough for me; from Nick Mathewson
svn:r339
|
|
1d308e88
|
2005-12-17T20:25:22
|
|
mostly whitespace fixes from OpenBSD via Brad
svn:r192
|
|
68292e2f
|
2005-12-03T17:52:47
|
|
signal handler satefy improvements from Theo DeRaadt
svn:r186
|
|
32bed8f9
|
2005-04-01T04:20:39
|
|
build fixes from nick mathewson
svn:r139
|
|
fbdaf3ab
|
2005-03-29T07:03:10
|
|
debugging callbacks from Nick Mathewson <nickm@freehaven.net>
svn:r136
|
|
b011b734
|
2004-11-25T09:54:33
|
|
forgot printf parameter
svn:r123
|
|
6df2ede5
|
2004-08-10T18:29:37
|
|
close file descriptors on exec(); suggested by aaron at die.net
svn:r119
|
|
025d1bc2
|
2004-05-24T00:19:52
|
|
fix some of the windows compile issues; make buffer.c faster; support
signals via pipes.
svn:r105
|
|
c3f496c7
|
2003-10-04T23:27:26
|
|
minor corrections; change license to 3-clause BSD license
svn:r84
|
|
6ce5b876
|
2003-06-12T23:33:19
|
|
clean up from NetBSD integration
svn:r72
|
|
cde7a352
|
2003-03-08T06:37:56
|
|
fix signal usage
svn:r45
|
|
b3d1c6a8
|
2003-02-28T22:38:30
|
|
support poll(2) and split out the signal handling
svn:r37
|