This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: fileutils-4.0-3
- To: Corinna Vinschen <cygwin-patches at cygwin dot com>
- Subject: Re: fileutils-4.0-3
- From: egor duda <deo at logos-m dot ru>
- Date: Sun, 17 Jun 2001 15:34:33 +0400
- Organization: deo
- References: <Pine.GSO.4.21.0106122003330.3791-100000@devmail.dev.tivoli.com><20010613105845.D1144@cygbert.vinschen.de><12812308989.20010613152159@logos-m.ru><20010613153123.K1144@cygbert.vinschen.de><4385449600.20010614114100@logos-m.ru><20010614170757.A1144@cygbert.vinschen.de>
- Reply-To: egor duda <cygwin-patches at cygwin dot com>
Hi!
Thursday, 14 June, 2001 Corinna Vinschen cygwin-patches@cygwin.com wrote:
>> >> well, CreateFile() accepts 0 as second argument, which is what we
>> >> need-- just query information no matter if anyone opened file in
>> >> DENYALL mode. i've just tested it on nt4.0 -- it works fine.
>> >>
>> >> the only question is whether we should add new parameter to
>> >> fhandler::open(), say 'int cygwin_flags', or define new flag in
>> >> fcntl.h? for me, the first one looks preferable.
>>
>> CV> Wow. I just read the MSDN entry of CreateFile and I must admit
>> CV> that I always slipped over that sentence without reading it.
>> CV> It seems obvious now. If that really works (as you state),
>> CV> it would be the ultimate solution for `fstat'.
>>
>> CV> I think you're right using some internal flag. It's not needed
>> CV> to create a new fcntl flag.
>>
>> patch attached. i was a bit confused to discover, however, that
>> stat_worker works somehow without it. AFAICS from stat_worker code,
>> if it cannot open file, it still tries to get as much information as
>> it can, file size and times included. so, du works for me either with
>> or without this patch.
CV> The patch is fine, IMO.
unfortunately, when file resides on a remote share,
CreateFile (fname,0,...,OPEN_EXISTING,...) returns valid handle even
if file doesn't exist! i've seen this on nt4, share is nt4 too. just
try to 'touch //server/share/non-exiting-file' -- it prints "file
doesn't exist" instead of creating it.
this patch is supposed to work around it. Can anybody test it in
w9x/w2k/samba environments?
Egor. mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
query-open-2.ChangeLog
query-open-2.diff