This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: mintty issue with version 2.3.7
- From: Duncan Roe <duncan_roe at acslink dot net dot au>
- To: cygwin at cygwin dot com
- Date: Mon, 11 Jul 2016 10:21:27 +1000
- Subject: Re: mintty issue with version 2.3.7
- Authentication-results: sourceware.org; auth=none
- References: <f8ac7e70-2b59-3aaa-4f8b-ce8f910f27bc@gmail.com>
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 <log file name>
>
> 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