public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mintty issue with version 2.3.7
@ 2016-06-29 11:11 Christoph Zimmermann
  2016-06-29 20:01 ` Thomas Wolff
  2016-07-11  0:21 ` Duncan Roe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Zimmermann @ 2016-06-29 11:11 UTC (permalink / raw)
  To: cygwin

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

-- 

This email account is monitored seven days a week.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mintty issue with version 2.3.7
  2016-06-29 11:11 mintty issue with version 2.3.7 Christoph Zimmermann
@ 2016-06-29 20:01 ` Thomas Wolff
  2016-07-11  0:21 ` Duncan Roe
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Wolff @ 2016-06-29 20:01 UTC (permalink / raw)
  To: cygwin

Am 29.06.2016 um 11:56 schrieb Christoph Zimmermann:
> 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>
I suppose you have set Log=something in your .minttrc;
the described behaviour is actually on purpose;
if there a exists a log file with the requested name already, it is 
assumed that it may contain valuable logging information
and shouldn't inadvertently be overwritten.
To configure logging in .minttyrc, you should use some % placeholders 
(see manual page) to create distinct log files.
I will amend the manual page for clarification.

Thomas

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mintty issue with version 2.3.7
  2016-06-29 11:11 mintty issue with version 2.3.7 Christoph Zimmermann
  2016-06-29 20:01 ` Thomas Wolff
@ 2016-07-11  0:21 ` Duncan Roe
  1 sibling, 0 replies; 3+ messages in thread
From: Duncan Roe @ 2016-07-11  0:21 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-11  0:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-29 11:11 mintty issue with version 2.3.7 Christoph Zimmermann
2016-06-29 20:01 ` Thomas Wolff
2016-07-11  0:21 ` Duncan Roe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).