Remove incorrect setting of errno = EBADF when a select() has data or eof on read fds and no data is waiting on error fds. Reference: /n/sources/patch/applied/ape-select Date: Thu Feb 28 23:44:23 CET 2013 Signed-off-by: jas@corpus-callosum.com --- /sys/src/ape/lib/ap/plan9/_buf.c Thu Feb 28 23:40:43 2013 +++ /sys/src/ape/lib/ap/plan9/_buf.c Thu Feb 28 23:40:41 2013 @@ -292,12 +292,6 @@ if(_startbuf(i) != 0) { return -1; } - b = f->buf; - if(rfds && FD_ISSET(i,rfds) && b->eof && b->n == 0) - if(efds == 0 || !FD_ISSET(i,efds)) { - errno = EBADF; /* how X tells a client is gone */ - return -1; - } } /* check wfds; for now, we'll say they are all ready */