Re: invalid argument in select() when peer socket is in FD_SET

2011-08-02 Thread Peter Jeremy
On 2011-Jul-31 16:20:08 +0200, Christoph P.U. Kukulies k...@kukulies.org wrote: if (array_of_fds[i]) { nfds = max(nfds, array_of_fds[i]) + 1; I suspect you mean: nfds = max(nfds, array_of_fds[i] + 1); FD_SET(array_of_fds[i], readfds);

invalid argument in select() when peer socket is in FD_SET

2011-07-31 Thread Christoph P.U. Kukulies
I posted this on freebsd-questions also but maybe the expert density isn't that high as here in hackers. Since I think it may be a design or implementation issue in FreeBSDs' select(), I'm posting it here as well, hoping to get an experts' answer. I have written a small server to test TCP/IP

Re: invalid argument in select() when peer socket is in FD_SET

2011-07-31 Thread Jilles Tjoelker
On Sun, Jul 31, 2011 at 04:20:08PM +0200, Christoph P.U. Kukulies wrote: I posted this on freebsd-questions also but maybe the expert density isn't that high as here in hackers. Since I think it may be a design or implementation issue in FreeBSDs' select(), I'm posting it here as well,

Re: invalid argument in select() when peer socket is in FD_SET

2011-07-31 Thread Christoph P.U. Kukulies
Am 31.07.2011 17:45, schrieb Jilles Tjoelker: On Sun, Jul 31, 2011 at 04:20:08PM +0200, Christoph P.U. Kukulies wrote: I posted this on freebsd-questions also but maybe the expert density isn't that high as here in hackers. Since I think it may be a design or implementation issue in FreeBSDs'