From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5839 invoked by alias); 11 Jul 2016 00:21:41 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 5830 invoked by uid 89); 11 Jul 2016 00:21:40 -0000 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 Received: from mail110.syd.optusnet.com.au (HELO mail110.syd.optusnet.com.au) (211.29.132.97) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 11 Jul 2016 00:21:39 +0000 Received: from dimstar.local.net (c122-107-168-99.eburwd5.vic.optusnet.com.au [122.107.168.99]) by mail110.syd.optusnet.com.au (Postfix) with ESMTP id 3EC8D7845D4 for ; Mon, 11 Jul 2016 10:21:34 +1000 (AEST) Received: (qmail 12832 invoked by uid 501); 11 Jul 2016 00:21:27 -0000 Date: Mon, 11 Jul 2016 00:21:00 -0000 From: Duncan Roe To: cygwin@cygwin.com Subject: Re: mintty issue with version 2.3.7 Message-ID: <20160711002127.GC26679@dimstar.local.net> Mail-Followup-To: cygwin@cygwin.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 X-SW-Source: 2016-07/txt/msg00118.txt.bz2 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