This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: mintty --log overwrites existing logfile in place
- From: Andy Koppe <andy dot koppe at gmail dot com>
- To: Christian Franke <Christian dot Franke at t-online dot de>, cygwin at cygwin dot com
- Date: Fri, 5 Aug 2011 21:38:54 +0100
- Subject: Re: mintty --log overwrites existing logfile in place
- References: <1Qoug4-1GulCy0@fwd17.aul.t-online.de>
On 4 August 2011 10:57, Christian Franke wrote:
> The mintty --log option is very useful but opens logfile without O_TRUNC
> or O_APPEND:
D'oh!
> mintty-1.0.1/child.c:
> Â// Open log file if any
> Âif (*cfg.log) {
> Â Âlog_fd = open(cfg.log, O_WRONLY | O_CREAT, 0600);
> Â Âif (log_fd < 0)
> Â Â Âerror("open log file");
> Â}
>
> Then it is sometimes difficult to determine where the new log output
> ends :-)
>
> I would suggest to add O_APPEND.
I'll ponder that. The original intention was O_TRUNC.
Thanks,
Andy
--
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