r16704@catbus: nickm | 2007-11-19 15:58:54 -0500

Check return value of event_add in signal.c


svn:r546
This commit is contained in:
Nick Mathewson 2007-11-25 21:28:43 +00:00
parent 2823cb0579
commit fa95fe469a
2 changed files with 3 additions and 1 deletions

View File

@ -9,6 +9,7 @@ Changes in current version:
o New function event_set_mem_functinons. It allows the user to give libevent replacement functions to use for memory management in place of malloc(), free(), etc. This should be generally useful for memory instrumentation, specialized allocators, and so on.
o The kqueue implementation now catches signals that are raised after event_add() is called but before the event_loop() call. This makes it match the other implementations.
o The kqueue implementation now restores original signal handlers correctly when its signal events are removed.
o Check return value of event_add in signal.c
Changes in 1.4.0:

View File

@ -199,8 +199,9 @@ evsignal_add(struct event *ev)
evsignal_base = base;
if (!sig->ev_signal_added) {
if (event_add(&sig->ev_signal, NULL))
return (-1);
sig->ev_signal_added = 1;
event_add(&sig->ev_signal, NULL);
}
return (0);