Subject: RE: cd /d/somedir fails, but cd /d; cd somedir works
From: "Tolkin, Steve" <[email-masked]>
To: "[email-masked]'" <[email-masked]>
Cc: "'Reynolds, John'" <[email-masked]>, "'Chris Faylor '" <[email-masked]>
Date: Wed, 14 Jun 2000 12:54:41 -0400

Various people have sent helpful suggestions.

0.  I am running cygwin 1.1.1 and so I will later upgrade to 1.1.2 to see if
that solves the cd /d/somedir problem.  In the meantime I see some other
anomalies, I am hoping that one of these is the cause of my "Permission
denied" problem 
described in earlier emails, for which I still do not have any workaound.

Summary: I get Permission denied from gcc, rcsdiff, and sort.  The first two
are forking another process to do the IO, e.g. gcc runs cpp.exe which is
what actually reports the problem.
1927/> TMP=/
1928/> gcc a.c
cpp.exe: /cc7nEycW.i: Permission denied
This same failure happens even if I set TMP to a textmode device.
I am completely stuck on this.
1929/> echo $CYGWIN
ntsec tty notitle

1.  I do not have unmount anywhere in my path?  Why not?
1924/> unmount /e
bash: unmount: command not found

2.  The output of the mount command shows that C: is binmode rather than
textmode.  Is this a problem?
Device              Directory           Type         Flags
C:\bin              /usr/bin            user         binmode
C:\lib              /usr/lib            user         binmode
d:                  /d                  user         textmode
f:                  /f                  user         textmode
C:                  /                   user         binmode
e:                  /e                  user         textmode

3. cygcheck -h -r -s -v shows that some mount points end with a space and
others end with a slash.  Why is this?

Scanning registry for keys with `Cygnus' in them...
HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/_'
  cygdrive flags = 0x00000020
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `C:\'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/d
  (default) = `d: '
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/e
  (default) = `e:\'
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/f
  (default) = `f: '
  flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `C:\bin'
  flags = 0x00000002
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `C:\lib'
  flags = 0x00000002

4. strace also shows some oddities.  If this is consistent with the bug that
was fixed in 1.1.2 please let me know.  If it is another problem please let
me know.

> If you are using 1.1.2, then please send an strace log to this list:
> 
>     strace -osomefile bash
>     cd /d/somedir
>     exit
> 
> The "somefile" will contain the strace log.

As I said I am not yet on 1.1.2 but the strace output also seems somewhat
odd.
It starts:

**********************************************
Program name: C:\bin\bash.exe
App version:  1001.0, api: 0.17
DLL version:  1001.2, api: 0.21
DLL build:    2000-06-07 23:55SNP
OS version:   Windows NT-4.0
Date/Time:    2000-06-14 11:18:00
**********************************************
 1157    6393 [main] bash 3996 reg_key::build_reg: failed to create key
Program Options in the registry
  514    6907 [main] bash 3996 reg_key::build_reg: failed to create key
Program Options in the registry
  430    7337 [main] bash 3996 environ_init: !C:=C:\WINNT

What is that failure all about?  It worries me.

Here is the end of strace shows the following when I tried 
cd /f/_mybin (which fails with 
bash: cd: /f/_mybin: No such file or directory

...
 7170 15993792 [main] bash 3996 mount_info::conv_to_win32_path:
conv_to_win32_path (/f/_mybin)
  340 15994132 [main] bash 3996 getcwd_inner: 0x247F174 (/) = getcwd_inner
(0x247F174, 260, posix) (cached)
  169 15994301 [main] bash 3996 normalize_posix_path: /f/_mybin =
normalize_posix_path (/f/_mybin)
  170 15994471 [main] bash 3996 mount_info::conv_to_win32_path: f:
\_mybin(rel), f: \_mybin(abs) 0x0(flags) = conv_to_win32_path (/f/_mybin)
7614465 23608936 [main] bash 3996 symlink_info::check: GetFileAttributesA
(f: \_mybin) failed
  325 23609261 [main] bash 3996 ../../../../csrc/winsup/cygwin/path.cc:2174
seterrno: 3 (PATH_NOT_FOUND) -> 2
  181 23609442 [main] bash 3996 symlink_info::check: 0 = symlink.check (f:
\_mybin, 0x247F519) (0x0)
 1333 23610775 [main] bash 3996 symlink_info::check: not a symlink
  180 23610955 [main] bash 3996 symlink_info::check: 0 = symlink.check (f: ,
0x247F519) (0x0)
  926 23611881 [main] bash 3996 path_conv::check: GetVolumeInformation(f:\)
= OK, full_path(f: \_mybin), set_has_acls(0)
 1366 23613247 [main] bash 3996 ../../../../csrc/winsup/cygwin/path.cc:2522
seterrno: 3 (PATH_NOT_FOUND) -> 2
  473 23613720 [main] bash 3996 chdir: -1 = chdir (/f/_mybin) (dos f:
\_mybin)
  298 23614018 [main] bash 3996 mount_info::conv_to_win32_path:
conv_to_win32_path (/f/_mybin)
  315 23614333 [main] bash 3996 mount_info::conv_to_posix_path:
conv_to_posix_path (c:\, no-keep-rel, no-add-slash)
  165 23614498 [main] bash 3996 normalize_win32_path: c:\ =
normalize_win32_path (c:\)
  164 23614662 [main] bash 3996 mount_info::conv_to_posix_path: / =
conv_to_posix_path (c:\)
  520 23615182 [main] bash 3996 getcwd_inner: 0x247F164 (/) = getcwd_inner
(0x247F164, 260, posix)
  167 23615349 [main] bash 3996 normalize_posix_path: /f/_mybin =
normalize_posix_path (/f/_mybin)
  170 23615519 [main] bash 3996 mount_info::conv_to_win32_path: f:
\_mybin(rel), f: \_mybin(abs) 0x0(flags) = conv_to_win32_path (/f/_mybin)
 1420 23616939 [main] bash 3996 symlink_info::check: GetFileAttributesA (f:
\_mybin) failed
  183 23617122 [main] bash 3996 ../../../../csrc/winsup/cygwin/path.cc:2174
seterrno: 3 (PATH_NOT_FOUND) -> 2
  160 23617282 [main] bash 3996 symlink_info::check: 0 = symlink.check (f:
\_mybin, 0x247F509) (0x0)
 1269 23618551 [main] bash 3996 symlink_info::check: not a symlink
  176 23618727 [main] bash 3996 symlink_info::check: 0 = symlink.check (f: ,
0x247F509) (0x0)
  920 23619647 [main] bash 3996 path_conv::check: GetVolumeInformation(f:\)
= OK, full_path(f: \_mybin), set_has_acls(0)
 1375 23621022 [main] bash 3996 ../../../../csrc/winsup/cygwin/path.cc:2522
seterrno: 3 (PATH_NOT_FOUND) -> 2
  462 23621484 [main] bash 3996 chdir: -1 = chdir (/f/_mybin) (dos f:
\_mybin)
  813 23622297 [main] bash 3996 _write: write (2, 0xA042A88, 47)
  208 23622505 [main] bash 3996 fhandler_base::write: after write, name
{stderr}, rpos 47
  163 23622668 [main] bash 3996 _write: 47 = write (2, 0xA042A88, 47)
...
  152 23636847 [main] bash 3996 _read: read (0, 0xA046C18, 1)
  724 23637571 [main] bash 3996 peek_pipe: {stdin}, ready for read
  717 23638288 [main] bash 3996 fhandler_base::read: read 1 bytes ( t)
  159 23638447 [main] bash 3996 read_handler: 1 = read (0<{stdin}>,
0xA046C18, 1)
  704 23639151 [main] bash 3996 set_sig_errno: errno 0
  156 23639307 [main] bash 3996 _read: read (0, 0xA046C18, 1)
  721 23640028 [main] bash 3996 peek_pipe: {stdin}, ready for read
  718 23640746 [main] bash 3996 fhandler_base::read: read 1 bytes ( 0xA)
  158 23640904 [main] bash 3996 read_handler: 1 = read (0<{stdin}>,
0xA046C18, 1)
 3774 23644678 [main] bash 3996 set_process_mask: old mask = 0, new mask = 0
  282 23644960 [main] bash 3996 do_exit: do_exit (1)
  168 23645128 [main] bash 3996 void: 0x41B824 = signal (20, 0x1)
  158 23645286 [main] bash 3996 void: 0x0 = signal (1, 0x1)
  157 23645443 [main] bash 3996 void: 0x0 = signal (2, 0x1)
  156 23645599 [main] bash 3996 void: 0x1 = signal (3, 0x1)
  693 23646292 [main] bash 3996 _close: close (0)
  957 23647249 [main] bash 3996 fhandler_base::close: handle 0xE8
 1376 23648625 [main] bash 3996 _close: 0 = close (0)
  690 23649315 [main] bash 3996 _close: close (1)
  955 23650270 [main] bash 3996 fhandler_base::close: handle 0x104
 1372 23651642 [main] bash 3996 _close: 0 = close (1)
  689 23652331 [main] bash 3996 _close: close (2)
  954 23653285 [main] bash 3996 fhandler_base::close: handle 0x128
 1369 23654654 [main] bash 3996 _close: 0 = close (2)
15781 23670435 [main] bash 3996 proc_terminate: nchildren 0, nzombies 0
  157 23670592 [main] bash 3996 proc_terminate: leaving
  153 23670745 [main] bash 3996 sigproc_terminate: entering
  155 23670900 [main] bash 3996 sigproc_terminate: done
  155 23671055 [main] bash 3996 do_exit: 3996 == pgrp 3996, send
SIG{HUP,CONT} to stopped children
  158 23671213 [main] bash 3996 kill_pgrp: pid 3996, sig -1
  200 23671413 [main] bash 3996 proc_exists: checking for existence of pid
3995, window pid 325
  193 23671606 [main] bash 3996 proc_exists: it exists, 0x144
  267 23671873 [main] bash 3996 proc_exists: checking for existence of pid
1000, window pid 240
  183 23672056 [main] bash 3996 proc_exists: it exists, 0xD0
  201 23672257 [main] bash 3996 kill_pgrp: -1 = kill (3996, -1)
  173 23672430 [main] bash 3996 __to_clock_t: dwHighDateTime 0,
dwLowDateTime 2603744
  178 23672608 [main] bash 3996 __to_clock_t: total 00000000 00000104
  159 23672767 [main] bash 3996 __to_clock_t: dwHighDateTime 0,
dwLowDateTime 1001440
  156 23672923 [main] bash 3996 __to_clock_t: total 00000000 00000064
  165 23673088 [main] bash 3996 my_parent_is_alive: No parent_alive mutex
  166 23673254 [main] bash 3996 do_exit: calling ExitProcess 1

--
Want to unsubscribe from this list?
Send a message to [email-masked]