Cygwin 1.3.3: Win2K: select() returning EBADF (causes thrashing in Boa)
Phil Dempster
dempster@lsil.com
Thu Sep 20 08:05:00 GMT 2001
I've compiled boa (http//www.boa.org) under Cygwin and it seems to work
(incidentally much better than it did with 1.3.2).
However, the select() call in Boa's main loop continually fails with
errno==EBADF. Whilst this doesn't actually break it functionally, it does
cause it to thrash taking up 99% CPU time.
if (select(OPEN_MAX, &block_read_fdset,
&block_write_fdset, NULL,
(request_block ? &req_timeout : NULL)) == -1) {
/* what is the appropriate thing to do here on EBADF */
if (errno == EINTR)
continue; /* while(1) */
else if (errno != EBADF) {
log_error_mesg(__FILE__, __LINE__, "select");
exit(errno);
}
}
Thoughts?
Regards,
Phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: text/x-algol68
Size: 8074 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20010920/275a11e6/attachment.bin>
More information about the Cygwin
mailing list