--- libev/ev.c 2010/10/24 18:12:41 1.360 +++ libev/ev.c 2010/10/24 19:01:01 1.361 @@ -1738,6 +1738,15 @@ { int i; +#if EV_CLEANUP_ENABLE + /* queue cleanup watchers (and execute them) */ + if (expect_false (cleanupcnt)) + { + queue_events (EV_A_ (W *)cleanups, cleanupcnt, EV_CLEANUP); + EV_INVOKE_PENDING; + } +#endif + #if EV_CHILD_ENABLE if (ev_is_active (&childev)) {