Win2000 anybody?

Corinna Vinschen
Wed Feb 27 16:47:00 GMT 2008

On Feb 27 11:32, Larry Hall wrote:
> Corinna Vinschen wrote:
>> On Feb 27 16:44, Corinna Vinschen wrote:
>>> Hi,
>>> does anybody here run Windows 2000 on a real machine (aka "not as
>>> vrtual machine")?  If so, can you try running something along the
>>> lines of
>>>   $ ls -l //server/share/non-empty-dir
>>> ?  Do you encounter something weird?
>> I forgot to ask for testing with the latest snapshot, sorry.
> Win2000?  Who uses that ol' lump?  I mean, what kind of backward,
> knuckle-draggin', misfit would be caught dead using that... oh, wait
> a minute.  I use that. ;-)
> Hm, weird.  Yes.  I see something I would call that.  It
> seems to be treating the directory as a file:
> bash-3.2$ uname -a
> CYGWIN_NT-5.0 s1 1.7.0s(0.180/4/2) 20080219 16:43:46 i686 Cygwin
> bash-3.2$ ls -l //ds9/tmp/size
> -rw-r--r-- 1 sash None 0 Nov 30  2006 //ds9/tmp/size
> bash-3.2$ ls  //ds9/tmp/size
> //ds9/tmp/size
> Is this what you were expecting?

No.  This is another weirdness.  This does not happen for me on my
VMware win2k.  What happens for me is this:

  $ ls -la //server/share/non-empty-dir
  total 0
  drwxr-xr-x 1 corinna None 0 Feb 27 15:37 .
  drwxr-xr-x 1 corinna None 0 Feb 27 15:37 ..


  $ ls -l //server/share/non-empty-dir/file
  -rw-r--r-- 1 corinna None 49 Feb 27 15:38 file

When running readdir() it doesn't find any file in the directory.  The
reason is that the first call to NtQueryDirectoryFile in
fhandler_disk_file::readdir() fails with a very strange error I never
saw before and I don't find any useful information about on the net:


If I switch the NtQueryDirectoryFile call to retrieve only one entry per
call, it works fine!  But it fails always with the above status code if
I let it retrieve as much entries as fit in the buffer.

I tracked down exactly when I introduced this problem:

But I have not the faintest idea what is causing it.  Blaeh :(
Maybe we should drop Win2K support...


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-developers mailing list