This is the mail archive of the
cygwin
mailing list for the Cygwin project.
mintty --log overwrites existing logfile in place
- From: "Christian Franke" <Christian dot Franke at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Thu, 04 Aug 2011 11:57:20 +0200
- Subject: mintty --log overwrites existing logfile in place
- Reply-to: "Christian Franke" <Christian dot Franke at t-online dot de>
The mintty --log option is very useful but opens logfile without O_TRUNC
or O_APPEND:
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.
Thanks,
Christian
--
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