pcp
[Top] [All Lists]

Re: [pcp] pcp update: RHBZ1187588 - PM_CONTEXT_LOCAL crashes process whe

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] pcp update: RHBZ1187588 - PM_CONTEXT_LOCAL crashes process when /etc/pcp.conf is unreadable
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Fri, 27 Feb 2015 10:44:11 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <20150226214409.GH13422@xxxxxxxxxx>
References: <20150226214409.GH13422@xxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
On 27/02/15 08:44, Frank Ch. Eigler wrote:
...  wherein a missing pcp.conf file was deemed a "FATAL PCP
     ERROR" and resulted in a process exit().  This sort of error handling
     is not appropriate within a library, as the application is better
     equipped to judge the severity of the problem.

Ahem, I beg to differ here.

If pcp.conf is missing then pretty much NOTHING works in pcpland ... this really is a fatal error.

Now while I agree that libraries as a rule should not call exit() there are cases where it makes no sense to continue ... this is one of them in my humble view.

And if the semantics of pmGetConfig() is to be changed, then we'd need to go find all the uses of pmGetConfig() and validate that they are indeed making an appropriate judgement ... a quick scan shows

179 uses of pmGetConfig
none in the context of an if ()
only 37 of these are of the form ... = pmGetConfig()

So I'd be willing to guess that there are 150+ cases where the code has been written with the assumption that if pcp.conf is not available there is no point continuing.

Note that pcp.conf not being available is at a whole different level of severity to SOMEVAR not be defined in pcp.conf.

<Prev in Thread] Current Thread [Next in Thread>