This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mintty --log overwrites existing logfile in place


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]