Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site mips.UUCP
Path: utzoo!linus!philabs!prls!amdimage!amdcad!decwrl!Glacier!mips!mash
From: mash@mips.UUCP (John Mashey)
Newsgroups: net.bugs.usg
Subject: Re: PATH bug?
Message-ID: <160@mips.UUCP>
Date: Wed, 7-Aug-85 03:50:38 EDT
Article-I.D.: mips.160
Posted: Wed Aug  7 03:50:38 1985
Date-Received: Sun, 11-Aug-85 03:50:41 EDT
References: <807@plus5.UUCP> <2562@sun.uucp>
Organization: MIPS Computer Systems, Mountain View, CA
Lines: 26

> > If the current directory is specified as the last directory searched using
> > a trailing ":" instead of ":." (in $PATH) then sh will not find executable
> > files in the current directory.
> > I have noticed this bug under Vr0 and Vr2.  Is this problem more widespread
> > than just my vendor?
>  ......
> Yes, it's even more widespread than you might think.  I suspect it's in
> every Bourne shell (except for the ones that've fixed it)....
> 
> The fix should be obvious (look in "service.c") - unless this is a feature,
> not a bug...

It is clearly a bug, not a feature, because it does not work like execvp(2),
which is supposed to be the canonical definition of what exec $PATH search is.
To verify this (from Bourne shell, with command in current directory):
PATH=:/bin time command (works)
PATH=/bin: time command (works)
PATH=/bin: command (not found)

This is clearly wrong; a long time ago, far away, we went to some pain to get
the identical path-search code into every command .... except /bin/sh. sigh.
-- 
-john mashey
UUCP: 	{decvax,ucbvax,ihnp4}!decwrl!mips!mash
DDD:  	415-960-1200
USPS: 	MIPS Computer Systems, 1330 Charleston Rd, Mtn View, CA 94043