delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/01/25/00:02:11

From: root AT jacob DOT remcomp DOT fr (root)
Subject: Re: file sharing during write
25 Jan 1997 00:02:11 -0800 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <m0vns6L-000AQFC.cygnus.gnu-win32@jacob.remcomp.fr>
Original-To: jqb AT netcom DOT com (Jim Balter)
Original-Cc: gnu-win32 AT cygnus DOT com
In-Reply-To: <32E80DFA.6C8@netcom.com> from "Jim Balter" at Jan 23, 97 05:18:50 pm
Original-Sender: owner-gnu-win32 AT cygnus DOT com

> find uses the lstat system call, and the cygwin implementation
> opens the file and actually reads it in order to see whether it is a
> symlink (now you know why find takes so long).  symlink_check dies
> opening a file opened for writing (a piece of Miscrosoft brilliance
> that helps unix weenies win the advocacy wars).  
[snip]
> Or, somehow tell the OS to allow files open for writing to be open
> for reading.

HINT:
----
HANDLE CreateFile(
    LPCTSTR  lpFileName,	// pointer to name of the file 
    DWORD  dwDesiredAccess,	// access (read-write) mode 
    DWORD  dwShareMode,	// share mode  <<<<<<<<<<<<<<look this <<<<<<<<<<<<<<
    LPSECURITY_ATTRIBUTES  lpSecurityAttributes,// pointer to security descriptor 
    DWORD  dwCreationDistribution,	// how to create 
    DWORD  dwFlagsAndAttributes,	// file attributes 
    HANDLE  hTemplateFile 	// handle to file with attributes to copy  
   );
Parameters
[snip]
dwShareMode
Specifies how this file can be shared. This parameter must be some combination 
of the following values:   
Value	Meaning
0	Prevents the file from being shared.
FILE_SHARE_READ	Other open operations can be performed on the file for 
                read access.
FILE_SHARE_WRITE	Other open operations can be performed on the file 
                for write access.

I suspect strongly that bash when opening the redirection file is just using
zero, meaning no share.

-- 
Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01 48.23.51.44
93430 Villetaneuse 			Fax 01 48.23.95.39
France
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019