This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: weird egcs bug
- To: Greg Bacon <gbacon at cs dot uah dot edu>
- Subject: Re: weird egcs bug
- From: Mo McKinlay <mmckinlay at labs dot interopen dot org>
- Date: Thu, 16 Mar 2000 21:33:53 +0000 (GMT)
- cc: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>, egcs-bugs at egcs dot cygnus dot com
# : 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