Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 20 Feb 2004 19:10:15 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: cygwin_attach_fd_to_handle(), mmap() Message-ID: <20040220181015.GA9982@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20040220173530 DOT GI813 AT cronosys DOT com> <20040220175953 DOT GA13066 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040220175953.GA13066@redhat.com> User-Agent: Mutt/1.4.2i On Feb 20 12:59, Christopher Faylor wrote: > On Fri, Feb 20, 2004 at 12:35:30PM -0500, Jason M. Felice wrote: > >I'm working on getting the cygwin port of rsync to be able to back up > >open files. This requires the FILE_FLAG_BACKUP_SEMANTICS flag. I've > >got rsync opening the file, and I use cygwin_attach_fd_to_handle() to > >get an fd, but the problem is that cygwin seems to map it as a "basic" > >handle and not a "diskfile" handle, and therefore rsync's mmap fails. > > There is no such thing as a "basic handle". Cygwin returns the handle > of the open file. That's it. FILE_FLAG_BACKUP_SEMANTICS should be set anyway when opening a file with Cygwin. It's set unconditionally in fhandler_base::open_fs. Well, more exact, fhandler_base::open_fs sets O_DIROPEN which in turn enables FILE_FLAG_BACKUP_SEMANTICS in the call to CreateFile in fhandler_base::open. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/