public inbox for cygwin-talk@cygwin.com
 help / color / mirror / Atom feed
* Cygwin mentioned in "current directory" discussion
@ 2010-11-10  4:38 Christopher Faylor
  2010-11-15 19:27 ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2010-11-10  4:38 UTC (permalink / raw)
  To: cygwin-talk

https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-10  4:38 Cygwin mentioned in "current directory" discussion Christopher Faylor
@ 2010-11-15 19:27 ` Corinna Vinschen
  2010-11-15 21:35   ` Andy Koppe
  0 siblings, 1 reply; 12+ messages in thread
From: Corinna Vinschen @ 2010-11-15 19:27 UTC (permalink / raw)
  To: cygwin-talk

On Nov  9 23:37, Christopher Faylor wrote:
> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx

This morning I added a comment to the blog, #42 in the list:

--- SNIP ---
  [I wouldn't put it past the Cygwin guys to patch ntdll...-Joshua]

  That's a bit over the top, but the new, undocumented way Vista and later
  uses to set the CWD requires some serious hacking to get the Linux semantics
  right.

  Note that the problem is not that SetCurrentDirectory creates a
  directory handle.  The problem is that it creates a directory handle
  without the chance to set certain flags, analogous to the CreateFile
  call:

  - SetCurrentDirectory always opens dirs without the FILE_SHARE_DELETE flag.
  - SetCurrentDirectory always opens dirs without the FILE_FLAG_POSIX_SEMANTICS flag.
  - SetCurrentDirectory always opens dirs without the FILE_FLAG_BACKUP_SEMANTICS flag.

  Apart from that, an annoying problem of the SetCurrentDirectory call is
  it's quite obvious flaw to allow only paths of up to 258 chars, even the
  UNICODE variant.  That's due to the fact that the CWD path storage is a
  fixed buffer of 260 wide chars (including a trailing backslash and a
  L'\0').  This is still true for the Vista/W7 style of CWD storage on the
  heap, even though the method would easily allow longer paths.

  A transparent solution for Windows 8 and later would be an Ex call as
  proposed by Andy, like this:

    BOOL SetCurrentDirectoryEx (LPCTSTR lpDirectoryName,
				DWORD dwShareMode,
				DWORD dwOpenFlags)

  with SetCurrentDirectoryExW allowing the same long pathname syntax for
  paths up to 32K as the CreateFileW and similar calls.

  Actually, for Cygwin it would already be sufficient (and even more
  convenient), to export the global pointer pointing to the current CWD
  datastructure on the heap.  Or better, to export the function which
  returns this pointer.  This would allow to get rid of the awkward code
  which extracts this global pointer by scanning the
  RtlGetCurrentDirectory_U function.

  I guess this should go without saying, but it would be nice if this new
  CWD storage method would be officially documented...
--- SNAP ---

Two minutes ago, I found that my comment had been silently removed!
I'm not aware that my comment contained offensive, abusive, or
disrespectful language.  I'm really wondering why Raymond decided
to remove my comment.  This is quite disappointing.


Corinna

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-15 19:27 ` Corinna Vinschen
@ 2010-11-15 21:35   ` Andy Koppe
  2010-11-16  8:30     ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Koppe @ 2010-11-15 21:35 UTC (permalink / raw)
  To: cygwin-talk

On 15 November 2010 19:26, Corinna Vinschen wrote:
> On Nov  9 23:37, Christopher Faylor wrote:
>> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx
>
> This morning I added a comment to the blog, #42 in the list:
>
> --- SNIP ---
>  [I wouldn't put it past the Cygwin guys to patch ntdll...-Joshua]
>
>  That's a bit over the top, but the new, undocumented way Vista and later
>  uses to set the CWD requires some serious hacking to get the Linux semantics
>  right.
>
>  Note that the problem is not that SetCurrentDirectory creates a
>  directory handle.  The problem is that it creates a directory handle
>  without the chance to set certain flags, analogous to the CreateFile
>  call:
>
>  - SetCurrentDirectory always opens dirs without the FILE_SHARE_DELETE flag.
>  - SetCurrentDirectory always opens dirs without the FILE_FLAG_POSIX_SEMANTICS flag.
>  - SetCurrentDirectory always opens dirs without the FILE_FLAG_BACKUP_SEMANTICS flag.
>
>  Apart from that, an annoying problem of the SetCurrentDirectory call is
>  it's quite obvious flaw to allow only paths of up to 258 chars, even the
>  UNICODE variant.  That's due to the fact that the CWD path storage is a
>  fixed buffer of 260 wide chars (including a trailing backslash and a
>  L'\0').  This is still true for the Vista/W7 style of CWD storage on the
>  heap, even though the method would easily allow longer paths.
>
>  A transparent solution for Windows 8 and later would be an Ex call as
>  proposed by Andy, like this:
>
>    BOOL SetCurrentDirectoryEx (LPCTSTR lpDirectoryName,
>                                DWORD dwShareMode,
>                                DWORD dwOpenFlags)
>
>  with SetCurrentDirectoryExW allowing the same long pathname syntax for
>  paths up to 32K as the CreateFileW and similar calls.
>
>  Actually, for Cygwin it would already be sufficient (and even more
>  convenient), to export the global pointer pointing to the current CWD
>  datastructure on the heap.  Or better, to export the function which
>  returns this pointer.  This would allow to get rid of the awkward code
>  which extracts this global pointer by scanning the
>  RtlGetCurrentDirectory_U function.
>
>  I guess this should go without saying, but it would be nice if this new
>  CWD storage method would be officially documented...
> --- SNAP ---
>
> Two minutes ago, I found that my comment had been silently removed!
> I'm not aware that my comment contained offensive, abusive, or
> disrespectful language.  I'm really wondering why Raymond decided
> to remove my comment.  This is quite disappointing.

Perhaps it got swallowed by a COM server that can't deal with a
disappeared working directory. ;)

Andy

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-15 21:35   ` Andy Koppe
@ 2010-11-16  8:30     ` Corinna Vinschen
  2010-11-16 16:11       ` Christopher Faylor
  0 siblings, 1 reply; 12+ messages in thread
From: Corinna Vinschen @ 2010-11-16  8:30 UTC (permalink / raw)
  To: cygwin-talk

On Nov 15 21:34, Andy Koppe wrote:
> On 15 November 2010 19:26, Corinna Vinschen wrote:
> > On Nov  9 23:37, Christopher Faylor wrote:
> >> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx
> >
> > This morning I added a comment to the blog, #42 in the list:
> >[...]
> >
> > Two minutes ago, I found that my comment had been silently removed!
> > I'm not aware that my comment contained offensive, abusive, or
> > disrespectful language.  I'm really wondering why Raymond decided
> > to remove my comment.  This is quite disappointing.
> 
> Perhaps it got swallowed by a COM server that can't deal with a
> disappeared working directory. ;)

Or Raymond fears hippos.


Corinna

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-16  8:30     ` Corinna Vinschen
@ 2010-11-16 16:11       ` Christopher Faylor
  2010-11-16 19:54         ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2010-11-16 16:11 UTC (permalink / raw)
  To: cygwin-talk

On Tue, Nov 16, 2010 at 09:29:24AM +0100, Corinna Vinschen wrote:
>On Nov 15 21:34, Andy Koppe wrote:
>> On 15 November 2010 19:26, Corinna Vinschen wrote:
>> > On Nov ??9 23:37, Christopher Faylor wrote:
>> >> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx
>> >
>> > This morning I added a comment to the blog, #42 in the list:
>> >[...]
>> >
>> > Two minutes ago, I found that my comment had been silently removed!
>> > I'm not aware that my comment contained offensive, abusive, or
>> > disrespectful language. ??I'm really wondering why Raymond decided
>> > to remove my comment. ??This is quite disappointing.
>> 
>> Perhaps it got swallowed by a COM server that can't deal with a
>> disappeared working directory. ;)
>
>Or Raymond fears hippos.

He also deleted my response to the guy who suggested that Windows does
copy-on-write so we could modify NTDLL.  And, now I can't seem to
respond at all.

Sure.  We could just figure out where to modify NTDLL in all of the
versions of NTDLL that have ever existed and then stand on our heads
to modify the memory in place every time a Cygwin process is started.

And, as Corinna says, this all flys in the face of Cygwin's philosophy.

Meh.

cgf

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-16 16:11       ` Christopher Faylor
@ 2010-11-16 19:54         ` Corinna Vinschen
  2010-11-16 21:10           ` Christopher Faylor
                             ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Corinna Vinschen @ 2010-11-16 19:54 UTC (permalink / raw)
  To: cygwin-talk

On Nov 16 11:11, Christopher Faylor wrote:
> On Tue, Nov 16, 2010 at 09:29:24AM +0100, Corinna Vinschen wrote:
> >On Nov 15 21:34, Andy Koppe wrote:
> >> On 15 November 2010 19:26, Corinna Vinschen wrote:
> >> > On Nov ??9 23:37, Christopher Faylor wrote:
> >> >> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx
> >> >
> >> > This morning I added a comment to the blog, #42 in the list:
> >> >[...]
> >> >
> >> > Two minutes ago, I found that my comment had been silently removed!
> >> > I'm not aware that my comment contained offensive, abusive, or
> >> > disrespectful language.  I'm really wondering why Raymond decided
> >> > to remove my comment.  This is quite disappointing.
> >> 
> >> Perhaps it got swallowed by a COM server that can't deal with a
> >> disappeared working directory. ;)
> >
> >Or Raymond fears hippos.
> 
> He also deleted my response to the guy who suggested that Windows does
> copy-on-write so we could modify NTDLL.  And, now I can't seem to
> respond at all.
> 
> Sure.  We could just figure out where to modify NTDLL in all of the
> versions of NTDLL that have ever existed and then stand on our heads
> to modify the memory in place every time a Cygwin process is started.
> 
> And, as Corinna says, this all flys in the face of Cygwin's philosophy.
> 
> Meh.

And now he deleted my reply to f0dder as well, giving the reason
"Discussing undocumented APIs is a good way to get a comment deleted"
and he closed the blog entry for further commenting.  Nice guy.
I don't quite understand the difference between my comments and the
other comments.

Apart from that I don't understand his weird replies about 0% and 100%
correctness.  Well, I'm not interested in COM anyway.  And if COM
changes the CWD it's broken by design.  But I guess that's not allowed
to say, either...


Corinna

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-16 19:54         ` Corinna Vinschen
@ 2010-11-16 21:10           ` Christopher Faylor
  2010-11-25  2:59           ` Dave Korn
  2010-11-27 11:20           ` Gary
  2 siblings, 0 replies; 12+ messages in thread
From: Christopher Faylor @ 2010-11-16 21:10 UTC (permalink / raw)
  To: cygwin-talk

On Tue, Nov 16, 2010 at 08:52:02PM +0100, Corinna Vinschen wrote:
>On Nov 16 11:11, Christopher Faylor wrote:
>> On Tue, Nov 16, 2010 at 09:29:24AM +0100, Corinna Vinschen wrote:
>> >On Nov 15 21:34, Andy Koppe wrote:
>> >> On 15 November 2010 19:26, Corinna Vinschen wrote:
>> >> > On Nov ??9 23:37, Christopher Faylor wrote:
>> >> >> https://blogs.msdn.com/b/oldnewthing/archive/2010/11/09/10087919.aspx
>> >> >
>> >> > This morning I added a comment to the blog, #42 in the list:
>> >> >[...]
>> >> >
>> >> > Two minutes ago, I found that my comment had been silently removed!
>> >> > I'm not aware that my comment contained offensive, abusive, or
>> >> > disrespectful language.  I'm really wondering why Raymond decided
>> >> > to remove my comment.  This is quite disappointing.
>> >> 
>> >> Perhaps it got swallowed by a COM server that can't deal with a
>> >> disappeared working directory. ;)
>> >
>> >Or Raymond fears hippos.
>> 
>> He also deleted my response to the guy who suggested that Windows does
>> copy-on-write so we could modify NTDLL.  And, now I can't seem to
>> respond at all.
>> 
>> Sure.  We could just figure out where to modify NTDLL in all of the
>> versions of NTDLL that have ever existed and then stand on our heads
>> to modify the memory in place every time a Cygwin process is started.
>> 
>> And, as Corinna says, this all flys in the face of Cygwin's philosophy.
>> 
>> Meh.
>
>And now he deleted my reply to f0dder as well, giving the reason
>"Discussing undocumented APIs is a good way to get a comment deleted"
>and he closed the blog entry for further commenting.  Nice guy.
>I don't quite understand the difference between my comments and the
>other comments.
>
>Apart from that I don't understand his weird replies about 0% and 100%
>correctness.  Well, I'm not interested in COM anyway.  And if COM
>changes the CWD it's broken by design.  But I guess that's not allowed
>to say, either...

I didn't get that either.  But I wonder which gets more hits: this
mailing list archive or his blog?

cgf

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-16 19:54         ` Corinna Vinschen
  2010-11-16 21:10           ` Christopher Faylor
@ 2010-11-25  2:59           ` Dave Korn
  2010-11-25  8:32             ` Corinna Vinschen
  2010-11-27 11:20           ` Gary
  2 siblings, 1 reply; 12+ messages in thread
From: Dave Korn @ 2010-11-25  2:59 UTC (permalink / raw)
  To: haha what a loser

On 16/11/2010 19:52, Corinna Vinschen wrote:

> And now he deleted my reply to f0dder as well, giving the reason
> "Discussing undocumented APIs is a good way to get a comment deleted"

  Suppressing undocumented APIs is what got MS sued to hell and back by every
monopoly department from here to Singapore, isn't it?  They should really
learn not to look like they're trying to hide stuff.

> and he closed the blog entry for further commenting.  

  Corporate drone.

> Nice guy.

  I beg to differ.  Say, exactly what are the limits on the use of language on
this list, anyway?

    cheers,
      DaveK

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-25  2:59           ` Dave Korn
@ 2010-11-25  8:32             ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2010-11-25  8:32 UTC (permalink / raw)
  To: cygwin-talk

On Nov 25 03:23, Dave Korn wrote:
> On 16/11/2010 19:52, Corinna Vinschen wrote:
> 
> > And now he deleted my reply to f0dder as well, giving the reason
> > "Discussing undocumented APIs is a good way to get a comment deleted"
> 
>   Suppressing undocumented APIs is what got MS sued to hell and back by every
> monopoly department from here to Singapore, isn't it?  They should really
> learn not to look like they're trying to hide stuff.
> 
> > and he closed the blog entry for further commenting.  
> 
>   Corporate drone.
> 
> > Nice guy.
> 
>   I beg to differ.  Say, exactly what are the limits on the use of language on
> this list, anyway?

Don't use dirty language, except in dirty circumstances.  Live and let
live, even lawyers.  In general, follow the ideals of hippokind.

But woe betide you if you talk about the cygwin_internal() API in public!


Corinna

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-16 19:54         ` Corinna Vinschen
  2010-11-16 21:10           ` Christopher Faylor
  2010-11-25  2:59           ` Dave Korn
@ 2010-11-27 11:20           ` Gary
  2010-11-27 19:13             ` Christopher Faylor
  2 siblings, 1 reply; 12+ messages in thread
From: Gary @ 2010-11-27 11:20 UTC (permalink / raw)
  To: cygwin-talk

Corinna Vinschen wrote:
> Nice guy.

He actually makes cgf look pleasant, well mannered, and inoffensive.

> I guess that's not allowed
> to say, either...

I guess we're both going to get our wrists slapped :D

-- 
Gary
Non-kook (allegedly)

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-27 11:20           ` Gary
@ 2010-11-27 19:13             ` Christopher Faylor
  2010-11-30  9:37               ` Gary
  0 siblings, 1 reply; 12+ messages in thread
From: Christopher Faylor @ 2010-11-27 19:13 UTC (permalink / raw)
  To: cygwin-talk

On Sat, Nov 27, 2010 at 12:19:43PM +0100, Gary wrote:
>Corinna Vinschen wrote:
>> Nice guy.
>
>He actually makes cgf look pleasant, well mannered, and inoffensive.

Please leave me out of this.

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

* Re: Cygwin mentioned in "current directory" discussion
  2010-11-27 19:13             ` Christopher Faylor
@ 2010-11-30  9:37               ` Gary
  0 siblings, 0 replies; 12+ messages in thread
From: Gary @ 2010-11-30  9:37 UTC (permalink / raw)
  To: cygwin-talk

Christopher Faylor wrote:
> On Sat, Nov 27, 2010 at 12:19:43PM +0100, Gary wrote:
>>Corinna Vinschen wrote:
>>> Nice guy.
>>
>>He actually makes cgf look pleasant, well mannered, and inoffensive.
>
> Please leave me out of this.

:-))

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

end of thread, other threads:[~2010-11-30  9:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-10  4:38 Cygwin mentioned in "current directory" discussion Christopher Faylor
2010-11-15 19:27 ` Corinna Vinschen
2010-11-15 21:35   ` Andy Koppe
2010-11-16  8:30     ` Corinna Vinschen
2010-11-16 16:11       ` Christopher Faylor
2010-11-16 19:54         ` Corinna Vinschen
2010-11-16 21:10           ` Christopher Faylor
2010-11-25  2:59           ` Dave Korn
2010-11-25  8:32             ` Corinna Vinschen
2010-11-27 11:20           ` Gary
2010-11-27 19:13             ` Christopher Faylor
2010-11-30  9:37               ` Gary

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