DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20295>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20295 apr_file_write_full() to pipe with timeout can return EAGAIN ------- Additional Comments From [EMAIL PROTECTED] 2003-06-04 16:32 ------- This has been an interesting investigation, and I got to re-learn something about pipes from long ago. I hit the issue on AIX as well and took the opportunity to contact an AIX guru. write() on a pipe for <= PIPE_BUF bytes will either write all of them or none of them. IOW, for relatively small write sizes, pipes have message behavior instead of stream behavior. When poll() returns "ready", it only means that at least 1 byte can be written. If, for example, PIPE_BUF is 8192 and when poll() returns only 192 bytes can be written and we try to write 8000 bytes, we'll get EAGAIN. Whether we hit this on a given system is related to the amount of data we try to write and PIPE_BUF and timing. So independent of platform, the logic has to accept that sometimes write() will return EAGAIN/EWOULDBLOCK after poll() says "ready". In this situation, it needs to give up the CPU (use select() or poll() to give up CPU for brief interval) and then try to write() again). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
