Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Reply-To: From: "Daren Davis" To: Subject: getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application Date: Wed, 10 Jan 2001 13:03:21 -0700 Message-ID: <002301c07b40$6229bdc0$c905010a@openmarket.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal X-MIME-Autoconverted: from 8bit to quoted-printable by po-1.openmarket.com id PAA19824 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id PAA15119 I have a CGI web application ported from Unix to the Windows NT / 2000 platform using Cygwin. Recently I upgraded my Cygwin tools from the B20 release to 1.1.7. After building my application with this new release, the getcwd() function call does not return a valid path. For example, if the current directory in MS-DOS format is “D:\abc\def”, getcwd() returns “d/abc/def”. After further investigation, I found that if I run the application in an MS-DOS command line window instead of my browser, getcwd() does return a complete and valid path in the form “/cygdrive/d/abc/def”. For some reason, the required “/cygdrive/” prefix is missing when the application is run under IIS on both the NT 4.0 server and a Windows 2000 server. Another weird situation is that if I have any Cygwin utility running concurrently on the server (e.g. bash, cat or wc waiting for input from stdin), then getcwd() does work properly when it is called under IIS. Has anyone else experienced these symptoms? I searched on “getcwd” in the mail archives and could not find anything closely related. Thanks for any help, Daren Davis Open Market, Inc. Here is the output of cygcheck: Cygnus Win95/NT Configuration Diagnostics Current System Time: Wed Jan 10 12:19:49 2001 WinNT Ver 4.0 build 1381 Service Pack 5 Path: /usr/local/bin /usr/bin /bin /cygdrive/d/WINNT/system32 /cygdrive/d/WINNT /cygdrive/d/program files/microsoft visual studio/vc98/bin /cygdrive/d/program files/microsoft visual studio/common/msdev98/bin SysDir: D:\WINNT\System32 WinDir: D:\WINNT PWD = `/home/administrator' USER = `administrator' MAKE_MODE = `unix' HOME = `/home/administrator' NUMBER_OF_PROCESSORS = `1' PROMPT = `$P$G' LOGONSERVER = `\\UT-DC-1' OS2LIBPATH = `D:\WINNT\system32\os2\dll;' COMSPEC = `D:\WINNT\system32\cmd.exe' SYSTEMDRIVE = `D:' HOSTNAME = `TORNADO' PROCESSOR_REVISION = `0501' !D: = `D:\Cygwin\bin' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.JS;.VBE;.JSE;.WSF;.WSH' COMPUTERNAME = `TORNADO' WINDIR = `D:\WINNT' USERPROFILE = `D:\WINNT\Profiles\Daren.Davis' PS1 = `\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' BLASTER = `A220 I5 D1 T4' MSINPUT = `D:\Program Files\MSINPUT' MACHTYPE = `i686-pc-cygwin' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 5 Stepping 1, GenuineIntel' WIN32DMIPATH = `C:\DMI\' OS = `Windows_NT' OLDPWD = `/usr/bin' PROCESSOR_ARCHITECTURE = `x86' TEMP = `/cygdrive/d/TEMP' PROCESSOR_LEVEL = `6' SYSTEMROOT = `D:\WINNT' HOMEDRIVE = `D:' SHLVL = `1' HOMEPATH = `\' USERDOMAIN = `OPENMARKET' USERNAME = `Daren.Davis' SHELL = `/bin/sh' HOSTTYPE = `i686' OSTYPE = `cygwin' TERM = `cygwin' _ = `/usr/bin/cygcheck' TZ = `MST7MDT6,M4.1.0/2,M10.5.0/2' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 (default) = `/cygdrive' cygdrive flags = 0x00000022 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/ (default) = `D:/Cygwin' flags = 0x00000002 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin (default) = `D:/Cygwin/bin' flags = 0x00000002 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib (default) = `D:/Cygwin/lib' flags = 0x00000002 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0 HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00 (default) = `D:' unix = `/' fbinary = 0x00000000 fsilent = 0x00000000 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrd er\Start Menu\&Programs\Cygnus Solutions (default) = (unsupported type) HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D a: fd N/A N/A c: hd FAT 2047Mb 78% CP UN d: hd NTFS 4094Mb 72% CP CS UN PA FC e: cd N/A N/A D:\Cygwin\bin /usr/bin user binmode D:\Cygwin\lib /usr/lib user binmode D:\Cygwin / user binmode Found: D:\Cygwin\bin\bash.exe Found: D:\Cygwin\bin\cat.exe Found: D:\Cygwin\bin\cpp.exe Found: D:\Cygwin\bin\find.exe Found: D:\Cygwin\bin\gcc.exe Found: D:\Cygwin\bin\gdb.exe Found: D:\Cygwin\bin\ld.exe Found: D:\Cygwin\bin\ls.exe Found: D:\Cygwin\bin\make.exe Found: D:\Cygwin\bin\sh.exe Found: \bin\sh.exe Warning: D:\Cygwin\bin\sh.exe hides \bin\sh.exe 56k 2000/12/03 D:\Cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0 "cygbz21.0.dll" v0.0 ts=2000/11/20 16:53 45k 2000/12/07 D:\Cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0 "cygform5.dll" v0.0 ts=2000/12/6 23:41 18k 2000/10/23 D:\Cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm.dll" v0.0 ts=2000/10/22 20:26 17k 2000/11/30 D:\Cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0 "cyghistory4.dll" v0.0 ts=2000/11/29 19:28 14k 2000/10/23 D:\Cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0 "cygintl.dll" v0.0 ts=2000/10/23 13:02 81k 2000/12/05 D:\Cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0 "cygitcl30.dll" v0.0 ts=2000/11/25 18:43 35k 2000/12/05 D:\Cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0 "cygitk30.dll" v0.0 ts=2000/11/25 18:43 45k 2000/10/22 D:\Cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0 "cygjbig1.dll" v0.0 ts=2000/10/22 17:06 119k 2000/10/23 D:\Cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0 "cygjpeg6b.dll" v0.0 ts=2000/10/22 18:58 26k 2000/12/07 D:\Cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0 "cygmenu5.dll" v0.0 ts=2000/12/6 23:40 159k 2000/12/07 D:\Cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++5.dll" v0.0 ts=2000/12/6 23:42 225k 2000/12/07 D:\Cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses5.dll" v0.0 ts=2000/12/6 23:39 15k 2000/12/07 D:\Cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0 "cygpanel5.dll" v0.0 ts=2000/12/6 23:40 162k 2000/10/23 D:\Cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0 "cygpng2.dll" v0.0 ts=2000/10/22 18:40 108k 2000/11/30 D:\Cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0 "cygreadline4.dll" v0.0 ts=2000/11/29 19:28 390k 2000/12/05 D:\Cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0 "cygtcl80.dll" v0.0 ts=2000/11/25 18:39 5k 2000/12/05 D:\Cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0 10k 2000/12/05 D:\Cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0 "cygtclreg80.dll" v0.0 ts=2000/11/25 18:39 243k 2000/10/23 D:\Cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0 "cygtiff3.dll" v0.0 ts=2000/10/22 19:14 623k 2000/12/05 D:\Cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0 "cygtk80.dll" v0.0 ts=2000/11/25 18:43 41k 2000/11/20 D:\Cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0 "cygXpm-noX4.dll" v0.0 ts=2000/11/19 19:41 45k 2000/11/20 D:\Cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0 "cygXpm-X4.dll" v0.0 ts=2000/11/19 19:45 49k 2000/10/23 D:\Cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0 "cygz.dll" v0.0 ts=2000/10/22 18:22 611k 2000/12/25 D:\Cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 "cygwin1.dll" v0.0 ts=2000/12/25 10:39 Cygwin DLL version info: dll major: 1001 dll minor: 7 dll epoch: 19 dll bad signal mask: 19005 dll old termios: 5 dll malloc env: 28 api major: 0 api minor: 31 shared data: 3 dll identifier: cygwin1 mount registry: 2 cygnus registry name: Cygnus Solutions cygwin registry name: Cygwin program options name: Program Options cygwin mount registry name: mounts v2 cygdrive flags: cygdrive flags cygdrive prefix: cygdrive prefix cygdrive default prefix: build date: Mon Dec 25 12:39:48 EST 2000 shared id: cygwin1S3 Use -h to see help about each section -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple