public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application
@ 2001-01-10 12:03 Daren Davis
  2001-01-10 12:27 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 5+ messages in thread
From: Daren Davis @ 2001-01-10 12:03 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 11041 bytes --]

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application
  2001-01-10 12:03 getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application Daren Davis
@ 2001-01-10 12:27 ` Larry Hall (RFK Partners, Inc)
  2001-01-10 13:03   ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-10 12:27 UTC (permalink / raw)
  To: Daren.Davis, cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

At 03:03 PM 1/10/2001, Daren Davis wrote:

>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.


Hm, this is a long shot but I noticed that your cygcheck output only had
/cygdrive defined for the current user.  Mine shows it for both the current
user and the local machine.  Since I expect that IIS runs as a user other 
than the current, this may well come into play.  I haven't checked the code
to see what is the hard-coded default path for unmounted drives but you might
want to try:

   mount -b -s --change-cygdrive-prefix /cygdrive

If this helps, it just indicates that the root of the path for unmounted 
drives is derived from the registry only (at least for the "local machine")
so this needs to be set.  Some poking around the code would probably give 
you the full answer if this doesn't resolve the issue.


Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application
  2001-01-10 12:27 ` Larry Hall (RFK Partners, Inc)
@ 2001-01-10 13:03   ` Christopher Faylor
  2001-01-10 13:12     ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 5+ messages in thread
From: Christopher Faylor @ 2001-01-10 13:03 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 10, 2001 at 03:23:05PM -0500, Larry Hall (RFK Partners, Inc) wrote:
>I haven't checked the code to see what is the hard-coded default path
>for unmounted drives

The default is /cygdrive, of course.

There should be no reason to set anything to /cygdrive since that is the
default.

If somone does use --change-cygdrive-prefix then the default should be
/cygdrive.

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application
  2001-01-10 13:03   ` Christopher Faylor
@ 2001-01-10 13:12     ` Larry Hall (RFK Partners, Inc)
  2001-01-10 13:27       ` Christopher Faylor
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-01-10 13:12 UTC (permalink / raw)
  To: cygwin

At 04:04 PM 1/10/2001, Christopher Faylor wrote:
>If somone does use --change-cygdrive-prefix then the default should be

            ^^^^
You mean doesn't, right?

>/cygdrive.

Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application
  2001-01-10 13:12     ` Larry Hall (RFK Partners, Inc)
@ 2001-01-10 13:27       ` Christopher Faylor
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Faylor @ 2001-01-10 13:27 UTC (permalink / raw)
  To: cygwin

On Wed, Jan 10, 2001 at 04:07:44PM -0500, Larry Hall (RFK Partners, Inc) wrote:
>At 04:04 PM 1/10/2001, Christopher Faylor wrote:
>>If somone does use --change-cygdrive-prefix then the default should be
>
>            ^^^^
>You mean doesn't, right?

Yes.  The hazards of typing while on conference calls...

cgf

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-01-10 13:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-10 12:03 getcwd() in cygwin 1.1.7 doesn't work properly in IIS web application Daren Davis
2001-01-10 12:27 ` Larry Hall (RFK Partners, Inc)
2001-01-10 13:03   ` Christopher Faylor
2001-01-10 13:12     ` Larry Hall (RFK Partners, Inc)
2001-01-10 13:27       ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).