svn commit: r245426 - head/bin/sh

Jilles Tjoelker jilles at stack.nl
Mon Jan 14 22:57:04 UTC 2013


On Mon, Jan 14, 2013 at 01:38:51PM -0500, Eitan Adler wrote:
> On 14 January 2013 11:40, Jilles Tjoelker <jilles at freebsd.org> wrote:
> > Author: jilles
> > Date: Mon Jan 14 16:40:50 2013
> > New Revision: 245426
> > URL: http://svnweb.freebsd.org/changeset/base/245426

> > Log:
> >   sh: Simplify cd-hash interaction.

> >   Instead of rechecking relative paths for all hashed utilities after a cd,
> >   track if any utility in cmdtable depends on a relative path in PATH.
> >   If there is such a utility, cd clears the entire table.

> Why not clear just these entries instead of the entire table?

Clearing too much might affect performance but not correctness. The
utilities will be looked up again if necessary.

Because it is uncommon nowadays to include a relative pathname in PATH,
I handle this case in a very simple manner.

-- 
Jilles Tjoelker


More information about the svn-src-head mailing list