Hi All,
As my understanding, with libevent, any io should be non_blocking, and here
comes my dumb q;-)
I want log stuffs(trace) to a disk file in my comm callback, so I open a
file like below, but I didn't get any write event to call back. I am using
Ubuntu Dapper and my target system is Solaris 10.
Using stdout worked.
Thanks.
Arthur
---------------------
fdmsg = open(glbCfg.msg_file, O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if(fdmsg<0)
{
err(-1, "Can't open file to write %s", glbCfg.msg_file);
}
//fdmsg = fileno(stdout);
if(fcntl(fdmsg, F_SETFL, O_NONBLOCK)==-1)
{
err(-1, "fcntl");
}
rcd = io_new_sink(fdmsg);
printf("rcd %p %d\n", rcd, fdmsg);
_______________________________________________
Libevent-users mailing list
[email protected]
http://monkey.org/mailman/listinfo/libevent-users