+static void
+kqueue_destroy (EV_P)
+{
+ close (kqueue_fd);
+
+ free (kqueue_events);
+ free (kqueue_changes);
+}
+
+static void
+kqueue_fork (EV_P)
+{
+ kqueue_fd = kqueue ();
+ fcntl (kqueue_fd, F_SETFD, FD_CLOEXEC);
+
+ /* re-register interest in fds */
+ fd_rearm_all (EV_A);
+}
+