X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=Jjxc qUXv5OWwJo3PpsdfQZKLUA8KhHNmWEDyUmDlwNsqXO2jt/IL6/ofWEQBEtOMxRkx UO2wJmkwQ4eZIJj4wVzSeGqbpAhGbebMuUcYRHF2wlEWKmzslecUTffWJmate59G oHQ20ZemJa3m0mZvWwbzIvRjBsaCZ6dqsYeLOeo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=OlCd1Pl7Ny ImVugXPHKZcCZzrXA=; b=drqtQre7E5RMMVkCY26S6Db3Yz/UwlcfJidmW+yDTe j0k3SlHrekQM2Aw63rsddjzzH/obUiXHIxjJVXN08vwzc7iBQakzQChTHKUmRaAD ZPTFRHBZEaefOLPr1C8eE9TuGLQyntIOx0GB7nxzanSdNsyKqFAZRXWvqfvPzxV/ 8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*M:local, H*r:501, H*F:D*au X-HELO: mail110.syd.optusnet.com.au Date: Mon, 11 Jul 2016 10:21:27 +1000 From: Duncan Roe To: cygwin AT cygwin DOT com Subject: Re: mintty issue with version 2.3.7 Message-ID: <20160711002127.GC26679@dimstar.local.net> Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22 (2013-10-16) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=EfU1O6SC c=1 sm=1 tr=0 a=+cDhJlqnNvz9E7c5l3ERGg==:117 a=+cDhJlqnNvz9E7c5l3ERGg==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=cAmyUtKerLwA:10 a=6oAX7xTHw1aHInc5s3sA:9 a=CjuIK1q_8ugA:10 X-IsSubscribed: yes On Wed, Jun 29, 2016 at 11:56:14AM +0200, Christoph Zimmermann wrote: > After the recent update to version 2.3.7 mintty prints the error message > > Error: could not open log file: File exists. > : File exists > > every time I open a mintty window. I've tracked this down to the following > snippet (around line # 228) in child.c: > > char * logf = newn(char, MAX_PATH + 1); > strftime (logf, MAX_PATH, log, localtime (& now.tv_sec)); > free(log); > log = logf; > } > > log_fd = open(log, O_WRONLY | O_CREAT | O_EXCL, 0600); > if (log_fd < 0) { > // report message and filename: > childerror("could not open log file", false); > childerror(log, false); > } > > The culprit seems to be the open invocation with the combination of flags; > possibly pointing to > a problem in the corresponding cygwin.dll implementation. > > Please let me know if you need more details. > > Thanks, Chris > No problem with cydwin.dll. O_CREAT | O_EXCL makes it an error if the file exists: see "man open" Cheers ... Duncan. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple