c++ - select() on a pipe in blocking mode returns EAGAIN -
the man pages select() not list eagain possible error code select() function.
can explain in cases select() can produce eagain error?
if understand select_tut man page, eagain can produced sending signal process blocked waiting on blocked select(). correct?
since using select() in blocking mode timeout, this:
bool selectrepeat = true; int res = 0; timeval selecttimeout( timeout ); while ( true == selectrepeat ) { res = ::select( fd.get() + 1, null, &writefdset, null, &selecttimeout ); selectrepeat = ( ( -1 == res ) && ( eintr == errno ) ); } should repeat loop when error number eagain?
select() not return eagain under circumstance. may, however, return eintr if interrupted signal (this applies system calls).
eagain (or ewouldblock) may returned read, write, recv, send, etc.
Comments
Post a Comment