delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/16/21:50:59

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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: Wed, 16 Jun 2004 21:47:29 -0400
From: "Pierre A. Humblet" <pierre DOT humblet AT ieee DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: Problem creating files on network drives with cygwin 1.5.10-3 and tar
Message-ID: <20040617014728.GA653435@hpn5170x>
Mail-Followup-To: "Pierre A. Humblet" <pierre DOT humblet AT ieee DOT org>, cygwin AT cygwin DOT com
References: <20040616200246 DOT GA158945 AT Worldnet> <20040617011003 DOT 83544 DOT qmail AT web61006 DOT mail DOT yahoo DOT com>
Mime-Version: 1.0
In-Reply-To: <20040617011003.83544.qmail@web61006.mail.yahoo.com>
User-Agent: Mutt/1.4.1i

On Wed, Jun 16, 2004 at 06:10:03PM -0700, Rick Rankin wrote:
> --- "Pierre A. Humblet" <pierre DOT humblet AT ieee DOT org> wrote:
> > 
> > Due to the way the debug_printf are located in fhandler_base::open (PTC),
> > more information is displayed in case of success than in case of failure.
> > So it would be interesting to rerun strace after touching the file.
> > Doing a strace .... | fgrep NtCreateFile 
> > should already give most of the useful info.
> > 
> > Also, is 0x601 the only combination that fails?
> > 
> 
> It seems to be the O_TRUNC flag that's causing the problem. If I remove it, the
> open succeeds when the file doesn't exist.
> 
> Here's the output of 'strace opentest /cygdrive/m/foo | fgrep NtCreateFile'
> when /cygdrive/m/foo exists and with the O_TRUNC flag (1 line):
> 
>  1081  154650 [main] opentest 1796 fhandler_base::open: 0 = NtCreateFile
> (0x32C, 40100080, m:\foo, io, NULL, 80, 7, 0, 20, NULL, 0)
 
The most likely explanation is that one of your network drives does not fully
support the FILE_SUPERSEDE creation flag. Perhaps one could use FILE_OVERWRITE_IF
instead. The difference is slight and according to 
http://www.osronline.com/article.cfm?id=302 
this is how CREATE_ALWAYS is implemented. CREATE_ALWAYS was used up to 
1.5.9 on NT systems.

Pierre
 

--
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/

- Raw text -


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