| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| X-SWARE-Spam-Status: | No, hits=-0.2 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,UNPARSEABLE_RELAY |
| X-Spam-Check-By: | sourceware.org |
| MIME-Version: | 1.0 |
| Date: | Thu, 04 Aug 2011 11:57:20 +0200 |
| Reply-To: | "Christian Franke" <Christian DOT Franke AT t-online DOT de> |
| To: | cygwin AT cygwin DOT com |
| Subject: | mintty --log overwrites existing logfile in place |
| From: | "Christian Franke" <Christian DOT Franke AT t-online DOT de> |
| Message-ID: | <1Qoug4-1GulCy0@fwd17.aul.t-online.de> |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |