Hi Steffen,

> Just call me Steffen.

Yes, sorry, muscle memory knows someone else and I normally notice and
correct it.

> > > (The idea is that we now catch things when they get set as
> > > necessary, and can use them without further tests from then on.
> >
> > That sounds like a race condition.  :-)  Especially in a long-lived
> > program.  What later operations don't bother error checking because
> > $HOME is not writable, for example?
>
> Well, we initially fall back to what the user database reports for the
> local user if $HOME does not work out.  Of course later failures are
> still handled (much too many are fatal still where that may not be
> necessary, however).  But we know $HOME, $TMPDIR etc. are set and do
> not need myriads of unnecessary conditionals in the code.

Neither does the normal way of running through the alternatives once,
lazily on first real need, and caching the result, e.g. a `static char
*home' in find_home().

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
__________________________________
[email protected]

Reply via email to