Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <415620DD.7B0537B9@dessent.net> Date: Sat, 25 Sep 2004 18:52:29 -0700 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com CC: lighttpd AT lists DOT kneschke DOT de Subject: Re: lighttpd - problems with cgi scripts References: <4155E9CE DOT 5060903 AT familiehaase DOT de> <41560B26 DOT FCC450C7 AT dessent DOT net> <1645302901 DOT 20040926033627 AT familiehaase DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com "Gerrit P. Haase" wrote: > That works, thanks for pointing this out, however, lighttpd should > simply give back an error instead of burning my cpu. I agree. > > > This sounds suspiciously like the "SYSTEMROOT being removed from the > > environment" problem. > > Hmmm, SYSTEMROOT: > $ set | grep SYSTEMROOT > SYSTEMROOT='C:\WINNT' That's from a normal shell prompt though, right? It must be set in the environment of the CGI script that's forked from the lighttpd. Try a simple CGI that just runs "printenv" and see if it's set there. The reason it seems to come up in CGI scripts is that often the environment is cleansed of all but certain permitted variables, and it seems that SYSTEMROOT is the casualty of this. It's a situation particular to Cygwin, as win32 native code would know not to remove it, whereas its meaningless to stuff written for posix/unix. > Doesn't a cygwin application need to know about CYGWIN_ROOT instead of > SYSTEMROOT? > > I'll see if I can find the thread about it in the archives. I've never heard of the CYGWIN_ROOT variable before. I think the problem is that when you go to use a socket function, eventually the win32 winsock functions get called, and they depend on having SYSTEMROOT set in the environment. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/