Sujet : Re: Default PATH setting - reduce to something more sensible?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.unix.programmerDate : 14. Jan 2025, 18:59:05
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250114095609.372@kylheku.com>
References : 1 2 3
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-01-14, Scott Lurndal <
scott@slp53.sl.home> wrote:
Rainer Weikusat <rweikusat@talktalk.net> writes:
As far as I could determine, some sort of path searching has existed
since the 6th edition of UNIX (., /bin and /usr/bin hardcoded in the
shell) and in its present form, it has existed since the 7th edition of
UNIX. Which means PATH searching was used on PDP-11 16-bit minicomputers
in the 1970s. It didn't cause performance problems back
then and will thus certainly don't cause any today.
>
There are cases where it _does_ cause performance degradation, if one or
more of the PATH elements refer to NFS filesystems, for example.
If it doesn't hurt, that "hash -r" stuff in Bash and probably other
shells has to be just developer gold plating. :)
I suspect that machines becoming faster *and* process creation becoming
more complex and heavier (e.g. attaching multiple shared libraries and
resolving symbols) has allowed us to get away with longer PATHs without
noticing.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca