[systemd-devel] [PATCH] use "Out of memory." consistantly (or with "\n")
Lennart Poettering
lennart at poettering.net
Mon Aug 6 07:55:29 PDT 2012
On Mon, 06.08.12 16:47, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
>
> On 08/06/2012 04:39 PM, Lennart Poettering wrote:
> > On Fri, 03.08.12 17:33, shawn (shawnlandden at gmail.com) wrote:
> >
> > Applied!
> >
> > Note that we should be carefuly with adding additional erorr messages to
> > the EXIT_SUCCESS/EXIT_FAILURE bits, since we might end up with two error
> > messages instead of one, which is something we should try to avoid...
> Can we specify that the policy is that the oom message is logged at the
> point where the NULL return value is converted into a ENOMEM return code?
It's probably not that easy. I mean, stuff such as hashmap_new()
probably should never log this kind of thing on its own.
So far we tried to follow the logic that "library"-like calls never log
on their own, and that logging is always done only in the final
tools. But this is followed only very losely.
I guess one could formulate a rule like this: calls in src/shared/
should never log, but other code should, but about a thousand exceptions
of this are OK...
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list