delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/07/07:10:20

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4E3D1981.7040208@t-online.de>
References: <1Qoug4-1GulCy0 AT fwd17 DOT aul DOT t-online DOT de> <CAHWeT-YaTX+dg=Ldf=7s4DfuVwnNFbJSOuZ9oAeCdir+s7x9_g AT mail DOT gmail DOT com> <CAEhDDbBbr_EftvgFJOegvTS4VPdjDR2X_tSeFKb=KCtcYqEV3Q AT mail DOT gmail DOT com> <4E3D1981 DOT 7040208 AT t-online DOT de>
Date: Sun, 7 Aug 2011 13:09:56 +0200
Message-ID: <CAEhDDbA6WLsm1HZAkY+W_6mHE4NahkZcRYibU+XrGESUHzUFyA@mail.gmail.com>
Subject: Re: mintty --log overwrites existing logfile in place
From: Csaba Raduly <rcsaba AT gmail DOT com>
To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p77BAGqb000549

On Sat, Aug 6, 2011 at 12:37 PM, Christian Franke  wrote:
> Agree, e.g. "--log +FILE" appends to FILE:
>
> client.c:
>  // Open log file if any
>  if (*cfg.log) {
>    if (cfg.log[0] == '+' && cfg.log[1])
>      log_fd = open(cfg.log+1, O_WRONLY | O_CREAT | O_APPEND, 0600);
>    else
>      log_fd = open(cfg.log, O_WRONLY | O_CREAT | O_TRUNC, 0600);
>    if (log_fd < 0)
>      error("open log file");
>  }

I was thinking along the lines of a user preference. I don't like
magic file names. But it's up to Andy :)

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019