This program works normally on ubuntu, but on os x leopard it immediately
exits with errno: "Operation not supported". Why does it not work on os x?
static void fifo_read(int fd, short event, void *arg)
{
printf("Callback!\n");
struct event *ev = arg;
char buf[100];
memset(buf, 0, 100);
read(0, buf, 100);
printf("Received %s\n", buf);
}
int main(int argc, char **argv)
{
event_init();
struct event evfifo;
event_set(&evfifo, 0, EV_READ | EV_PERSIST, fifo_read, &evfifo);
event_add(&evfifo, NULL);
event_dispatch();
printf("Done %s\n", strerror(errno));
return 0;
}
Rapsey
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkeymail.org/mailman/listinfo/libevent-users