[patch] Add support for logrotate and timestamps
Jim Meyering
jim at meyering.net
Tue Aug 2 07:56:24 UTC 2011
Pete Zaitcev wrote:
> On Mon, 01 Aug 2011 20:24:27 +0200
> Jim Meyering <jim at meyering.net> wrote:
>
>> +static void replace_newline(char *s)
>
>> Perhaps more importantly, its name should
>> be something like "append_newline_if_absent".
>> The current name is misleading.
>
> How about "assure_newline"?
Sure.
>> declare at point of first use when possible)
>
> I just can't bring myself to do it, Jim. Too nasty.
There are several good reasons for using that style:
http://thread.gmane.org/gmane.comp.lib.iwhd.devel/471/focus=476
If it bothers you that much, just concentrate on the semantics
and I'll do the clean-up.
>> + fflush(stdout);
>> + fflush(stderr);
>> + setlinebuf(stdout);
>> + setlinebuf(stderr);
>>
>> On that note, if anything about the initial log_reset call
>> fails, I would expect iwhd to exit. Would you please
>> make log_reset return an indication of success/failure
>> so that at least that caller can exit upon failure?
>
>> At the other point of use, in hup_handler, we should not exit
>> upon log_reset failure.
>
> This makes some sense, I guess...
>
> -- Pete
More information about the iwhd-devel
mailing list