weird egcs bug

Mo McKinlay mmckinlay@labs.interopen.org
Thu Mar 16 13:37:00 GMT 2000


# : Isn't it wrong that maxfd is both incremented and added 1?
# 
# Well, yes, but that shouldn't cause select() to hang, should it?

No - especially as both the (maxfd+1) and maxfd++ are executed
independent of whether the printf() is.

I personally use FD_SETSIZE as the first argument of select() most of the
time, although I'd be tempted to use (fd1>fd2?fd1:fd2)+1 in this case.

-- 
Mo McKinlay                                T: +44 (0) 709 22 55 05  x1
Chief Software Architect                   F: +44 (0) 709 22 55 05  x3
inter/open                                 E: mmckinlay@labs.interopen.org
A division of Bekon Marketing Limited      W: http://www.interopen.org



More information about the Gcc-bugs mailing list