Christopher Layne wrote:
+ /* save previous handler setup */
+ if (sigaction(evsignal, NULL, sig->sa_old[evsignal]) == -1
+ || sigaction(evsignal, &sa, NULL) == -1)
Not worth changing unless you're redoing the patch anyway, but is there
some reason you aren't doing this in a single call? I.e.,
if (sigaction(evsignal, &sa, sig->sa_old[evsignal]) == -1) {
...
- if (!base->sig.ev_signal_added) {
- base->sig.ev_signal_added = 1;
- event_add(&base->sig.ev_signal, NULL);
+ if (!sig->ev_signal_added) {
+ sig->ev_signal_added = 1;
+ event_add(&sig->ev_signal, NULL);
}
There's a bug here (that predates your change): this code should handle
event_add() failure. (E.g., epoll_ctl() returning ENOMEM.)
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkeymail.org/mailman/listinfo/libevent-users