Olivier Samyn wrote:
> Just for fun, I tried again to get chrokee compiled on win32, using
> Mingw, Msys and the configure script (not the Makefile.Mingw)
>
> I got it working with some changes (there are probably some
> remaining bugs).
I have also been trying to fix it. Yesterday I found a weird
problem around the I/O support on Windows. The following part of
your patch is related to it..
> --- cherokee-0.4.31b5/cherokee/util.c Mon Jan 30 23:06:32 2006
> +++ cherokee-0.4.31b5-os/cherokee/util.c Tue Jan 31 14:41:34 2006
> @@ -187,8 +187,13 @@
> *limit = OPEN_MAX; /* need to include limits.h somehow */
> return ret_ok;
> #else
> +#ifdef _WIN32
> + *limit = 256;
> + return ret_ok;
> +#else
> *limit = FD_SETSIZE;
> return ret_ok;
> +#endif
> #endif
> #endif
> #endif
As far as I've seen, Windows doesn't return the file descriptor
numbers as Linux and Solaris do. When the application begins to
run, you can expect to get fd numbers like: 4, 5 o 6; but in my
tests on Windows I got descriptors like 1500 or 1600.
With the current fdpoll-select implementation, that will overflow
the internal memory arrays, and hence, will make the server crash.
With the current logic, if the file descriptor limit is 256, it
doesn't expect to get a descriptor with the value 260.
This is what I dug:
http://www.0x50.org/bugs/ticket/37
The rest of the patch looks nice, I'll try to get a deeper look at
it this evening. Thank you Oliver. Good stuff!! :-)
--
Greetings, alo.
_______________________________________________
Cherokee mailing list
[email protected]
http://www.alobbs.com/cgi-bin/mailman/listinfo/cherokee