ioloop-notify-kqueue.c revision 6a029ebed745994ce2e5f64182d8b5c8f10d53d6
/*
* BSD kqueue() based ioloop notify handler.
*
* Copyright (c) 2005 Vaclav Haisman <v.haisman@sh.cvut.cz>
*
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#define _GNU_SOURCE
#include "lib.h"
#ifdef IOLOOP_NOTIFY_KQUEUE
#include "ioloop-internal.h"
#include <unistd.h>
#include <fcntl.h>
struct ioloop_notify_handler_context {
int kq;
};
static void event_callback(void *context)
{
i_fatal("gettimeofday() failed: %m");
i_fatal("kevent() failed: %m");
return;
}
}
{
struct ioloop_notify_handler_context *ctx;
i_fatal("kqueue() failed: %m");
}
{
struct ioloop_notify_handler_context *ctx =
i_error("close(kqueue notify) failed: %m");
}
{
break;
}
}
}
{
struct ioloop_notify_handler_context *ctx =
| NOTE_REVOKE, 0, NULL };
int fd;
if (fd == -1) {
return NULL;
}
return NULL;
}
}
return io;
}
{
struct ioloop_notify_handler_context *ctx =
int ret;
if (ret == -1)
i_error("kevent() for notify failed: %m");
}
#endif