X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <1Qoug4-1GulCy0@fwd17.aul.t-online.de> References: <1Qoug4-1GulCy0 AT fwd17 DOT aul DOT t-online DOT de> Date: Fri, 5 Aug 2011 21:38:54 +0100 Message-ID: Subject: Re: mintty --log overwrites existing logfile in place From: Andy Koppe To: Christian Franke , cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p75KdJH6014152 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