Hi All,<br><br>As my understanding, with libevent, any io should be non_blocking, and here comes my dumb q;-)<br><br>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.
<br><br>Using stdout worked.<br><br>Thanks.<br><br>Arthur<br>---------------------<br> fdmsg = open(glbCfg.msg_file, O_WRONLY|O_CREAT|O_APPEND|O_NONBLOCK, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);<br> if(fdmsg<0)<br>
{<br> err(-1, "Can't open file to write %s", glbCfg.msg_file);<br> }<br> //fdmsg = fileno(stdout);<br> <br> if(fcntl(fdmsg, F_SETFL, O_NONBLOCK)==-1)<br> {<br> err(-1, "fcntl");
<br> }<br> <br> rcd = io_new_sink(fdmsg);<br> printf("rcd %p %d\n", rcd, fdmsg);<br><br>