From: Keith M. <kei...@us...> - 2013-02-11 17:58:16
|
On 09/02/13 17:40, Earnie Boyd wrote: > However my statements for D:Path as it concerns the OS is correct, it > is a relative path to mean the CWD of the specified device. MSYS > however is somehow modifying CWD without returning it to the previous > CWD. Sorry. I don't understand the significance, within the context of the current discussion, of the point you are trying to make. Certainly:-- * The MS-Windows OS, bedevilled by its fragmented multiple-device file system implementation, must maintain a current directory context per process, for each separate device; it must also maintain a current drive context for each process. * POSIX/Unix systems, having a logically homogeneous representation of the file system hierarchy, need only to maintain per process current directory context, (one item per process); there is no concept of a current drive, nor of current directory context for *any* device. * MSYS emulates the POSIX behaviour, but on the MS-Windows OS platform. Thus, the MSYS *logical* concept of current working directory *must* be a hybrid representation of current drive context *and* current working directory context on current drive, as maintained by the OS. * To appropriately support this emulation, MSYS shell's "cd" command must invoke *both* of the OS's "set current drive", *and* its "set current directory" services; thus, on start up, when MSYS shell is placed in its default current directory, by cd $HOME (which in my case represents "C:/MinGW/msys/1.0/home/keith"), then the OS context for the shell process will have been set such that current drive = C: current directory (on drive C:) = /MinGW/msys/1.0/home/keith * When the OS is requested to perform *any* operation on "d:pathname", "pathname" is interpreted *relative* to the current working directory context on drive "d:", (as maintained by the OS). * Conversely, when performing OS operations on "d:/pathname", (or on "d:\pathname"), the current working directory context is ignored, and "pathname" is interpreted as an *absolute* path, from the root of drive "d:". The examples I've offered previously illustrate correct interpretation of OS context, when processed by OS commands; they also illustrate that MSYS commands, (well, "ls" anyway), seem to interpret "d:pathname" as if it had been specified as "d:/pathname"; to me, (and you now appear to agree), this seems like a bug in MSYS. However, I see no evidence to support the claim that "MSYS is somehow modifying CWD, and failing to return to previous CWD". -- Regards, Keith. |