This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fileutils-4.0-3


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]