This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mintty issue with version 2.3.7


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]