[patch] cygcheck.cc update for cygpath()
Christopher Faylor
cgf-use-the-mailinglist-please@cygwin.com
Sun Mar 9 23:20:00 GMT 2008
On Sun, Mar 09, 2008 at 08:55:09PM +0100, Corinna Vinschen wrote:
>On Mar 9 11:03, Brian Dessent wrote:
>> Christopher Faylor wrote:
>>
>> > I guess I misunderstood. I thought that the current working directory
>> > could be derived through some complicated combination of Nt*() calls.
>>
>> I could be wrong here but the way I understood it, there is no concept
>> of a working directory at the NT level, that is something that is
>> maintained by the Win32 layer.
>
>That's right. NT doesn't have a notion what a cwd is. It only has the
>OBJECT_ATTRIBUTES structure which defines an object by an absolute path,
>or by a path relative to a directory handle.
>
>The cwd is maintained by kernel32.dll in a per-process structure called
>RTL_USER_PROCESS_PARAMETERS. The cwd is stored as path (always with
>trailing backslash) and as handle.
Duh, right. I knew that. I've seen the code.
So, maybe we could make sure the handle was inherited and pass it along
in a _CYGWIN_PWD=0x239487 format to the child?
cgf
More information about the Cygwin-patches
mailing list