36 Commits

Author SHA1 Message Date
Nick Mathewson
eb1fa9f78e When running set[ug]id, don't check the environment.
Idea from OpenBSD, but made a bit more generic to handle uncivilized lands
that do not define issetugid.

svn:r1529
2009-11-15 18:59:55 +00:00
Nick Mathewson
b4183c732e Stop too many bytes for activequeues.
We were saying calloc(N,N*sizeof(struct event_list*)) when we should have
been saying calloc(N,sizeof(struct event_list*)).  This wasted N*(N-1) words
of memory, where N was the number of priorities.  This wouldn't be a big deal
for any sane number of priorities, but it's a bug nonetheless.

svn:r1526
2009-11-09 19:55:40 +00:00
Nick Mathewson
6ce14fd01c Rename compat/sys/_time.h to compat/sys/_libevent_time.h
On some systems (notably HPUX), there is already a
/usr/include/sys/_time.h, which our sys/_time.h shadows.  Found and
diagnosed by Kathryn Hogg.

This is a quick fix for 1.4 only; for 2.0, I want to eliminate
compat/sys/_time.h entirely, and have util-internal subsume it.



svn:r1493
2009-11-03 19:15:27 +00:00
Nick Mathewson
072ae5887e Remove unused event_gotsig code from 1.4 to appease some automated code checkers
svn:r1433
2009-09-23 22:19:00 +00:00
Nick Mathewson
0ae1851767 Backport: Update event_tv when time jumps backwards, so that we only note each jump once. Not strictly needed in 1.4, but good for correctness.
svn:r1354
2009-07-17 19:00:22 +00:00
Niels Provos
0ede290b3a from trunk: bug fix and potentital race condition from Alexander Drozdov
svn:r1026
2009-01-19 23:42:19 +00:00
Niels Provos
dfa9cb5d9b from trunk: constify structs; from Andrei Nigmatulin
svn:r960
2008-12-13 06:12:05 +00:00
Niels Provos
1958f3a7ba from trunk: fix a typo in setting the global event base; reported by lance
svn:r954
2008-11-27 19:59:06 +00:00
Niels Provos
e92d88c576 from trunk: Clear the timer cache when leaving the event loop; reported by Robin Haberkorn
svn:r951
2008-11-27 19:29:22 +00:00
Niels Provos
b93c182ff3 from trunk: clear the timer cache on entering event loop; reported by Victor Chang
svn:r945
2008-10-30 19:40:35 +00:00
Niels Provos
111ddeddac fix merge error: event_add would not return error for some backends; from Dean McNamee
svn:r943
2008-10-03 15:23:47 +00:00
Niels Provos
541290f635 from trunk: make event_add not change any state if it fails; repoted by Ian Bell
svn:r924
2008-07-25 01:34:22 +00:00
Niels Provos
7c7ab27960 from trunk: fix a problem with epoll() and reinit; repoted by Alexander Drozdov
svn:r919
2008-07-25 00:53:17 +00:00
Niels Provos
0e535d2f32 from trunk: support multiple events listening on the same signal; make signals regular events that go on the same event queue
svn:r902
2008-07-11 15:59:29 +00:00
Niels Provos
0690f0f555 fix warnings with USE_DEBUG
svn:r891
2008-06-30 01:01:28 +00:00
Niels Provos
9ce23febc2 constify struct timeval *
svn:r837
2008-05-17 02:19:21 +00:00
Niels Provos
38e97b143f from trunk: Fix use of freed memory in event_reinit; pointed out by Peter Postma
svn:r835
2008-05-16 01:58:05 +00:00
Nick Mathewson
ff6cbd06cf r19654@catbus: nickm | 2008-05-08 10:12:53 -0400
Remove #include "misc.h"s.


svn:r794
2008-05-08 14:19:34 +00:00
Nick Mathewson
987597ff0f r19651@catbus: nickm | 2008-05-08 10:05:35 -0400
Replace gettimeofday() usage with a new evutil_gettimeofday().  This removes all previous need for win32-code/misc.[ch]


svn:r793
2008-05-08 14:08:12 +00:00
Nick Mathewson
fe3c4a2440 r19631@catbus: nickm | 2008-05-07 16:06:48 -0400
Backport: fix compilation on non-c99 platforms.


svn:r781
2008-05-07 20:11:37 +00:00
Niels Provos
d58a0a7c42 revert to maintain stability: from trunk: separate signal events from io events
svn:r764
2008-05-04 00:52:57 +00:00
Niels Provos
974a75431d from trunk: separate signal events from io events
svn:r761
2008-05-03 21:40:32 +00:00
Niels Provos
bfdf56c22e from trunk: cache clock_gettime/gettimeofday values in base
svn:r759
2008-05-03 18:27:24 +00:00
Niels Provos
e1ab038bb5 from trunk: do not insert event into list when evsel->add fails
svn:r661
2008-02-25 07:35:57 +00:00
Niels Provos
72ae0a2e59 from trunk: event_base_get_method; from Springande Ulv
svn:r636
2008-02-16 06:10:52 +00:00
Niels Provos
d5aeeca0e8 from trunk: remove pending timeouts on event_base_free
svn:r628
2008-01-26 07:34:47 +00:00
Niels Provos
108ee5f3a6 from trunk:
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:r603
2007-12-19 04:52:28 +00:00
Niels Provos
b23f1dbe96 from trunk: move EV_PERSIST handling out of the event backends
svn:r592
2007-12-14 07:18:02 +00:00
Niels Provos
9a70838936 from trunk: remove obsolete recalc code
svn:r586
2007-12-13 05:58:05 +00:00
Niels Provos
eecd6932c7 from trunk:
Patch from Scott Lamb: Implement event_{base_}loopbreak.  Includes documentation and tests.  From sf.net Feature Request 1826546.


svn:r584
2007-12-12 06:26:07 +00:00
Niels Provos
75cc61bf2c from trunk: we need to pass the evbase to evsel->add
svn:r559
2007-11-27 06:46:44 +00:00
Niels Provos
7717cec719 from trunk: provide event_reinit() to reinitialized an event_base after fork - necessary for epoll/kqueue
svn:r557
2007-11-27 06:15:36 +00:00
Niels Provos
a060b24cfd from trunk: provide event_base_new() without setting current_base global
svn:r530
2007-11-14 17:53:43 +00:00
Niels Provos
57fe6ed265 from trunk: free minheap; from Christopher Layne
svn:r526
2007-11-13 03:33:07 +00:00
Niels Provos
5c796d7430 from trunk: We do not need to specially remove a timeout before calling event_del; patch from Christopher Layne.
svn:r520
2007-11-12 06:56:02 +00:00
Niels Provos
6b4342db67 copy trunk to 1.4
svn:r512
2007-11-12 02:37:25 +00:00