[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [PATCH 1/2] libgfs2: Expand out calls to die()


On Wed, 2011-12-14 at 17:14 +0000, Andrew Price wrote:
> On 14/12/11 16:41, Steven Whitehouse wrote:
> > Hi,
> >
> > Those look like a good start, but we also need to figure out how to push
> > the error handling back into the apps too,
> Yes, I made a tentative start on this a while ago. Each libgfs2 function 
> which calls exit() will need all of its callers (and their callers, and 
> their...) updating so it's going to take a fair deal more work.
> If we're agreed on the convention of setting errno and returning 
> non-zero (or non-valid values) to flag errors, then the way forward is 
> reasonably clear.
> Andy

Yes, I think that is a good way to do it. The only issues are likely to
arise when it is not obvious from this method exactly what has gone
wrong. In some cases this is due to doing the checks in the wrong place,
or there is some other complication. So its just a case of converting
things bit by bit and checking each place individually, which does make
it a rather slow job, but I'm not sure there is much alternative,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]