mod_fastcgi/cygwin issue with msvc compiled fastcgi applications
After much hair pulling I've found my particular bug with fastcgi on Windows lighttpd.
Any fastcgi binary application compiled with Microsoft (msvc 8, etc) compilers and running against a mod_fastcgi compiled under cygwin with a version of 1.5.24 or earlier will fail. The cygwin libraries do not emulate dup2() in such a way that the duplicated handle is reliably inheritable by a child process. This causes the fastcgi application to fail if it uses a tcp/ip connection for interprocess communication.
There's a discussion of the problem here:
Updated by stbuehler about 11 years ago
- Status changed from New to Fixed
- Resolution set to wontfix
I do not understand the problem completely; if i got it right, it is a cygwin/windows problem.
To be honest: i don't care. microsoft sucks, and cygwin is an ugly workaround. if you can provide a small and simple fix, i think we may use it (but i am not sure yet). otherwise spawning msvc fastcgi binaries from lighty may be just not usable under windows, and i really don't care about that.
just use a sane operating system... and if you do not, expect more problems.
Perhaps i should make this clear again: i would use lighty only for some trivial testing under windows... never for production.
so if you have a patch or more explanation why it is our fault and not cygwins and how it is fixable, just reopen. thx.
Updated by shinji almost 11 years ago
I just wanted to add one thing here. Anytime you mix cygwin with msvc binaries and/or calls you will get issues such as above. It is not normally expected that the cygwin developers would support such things but I do see that, based on the above post, it was indeed corrected in the cygwin code.
I'm leaving this as Wontfix since this is just a comment for future viewers.
Also available in: Atom