From nobody@FreeBSD.org  Sat Mar  9 15:23:55 2002
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id A010237B416
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  9 Mar 2002 15:23:54 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g29NNsl91233;
	Sat, 9 Mar 2002 15:23:54 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200203092323.g29NNsl91233@freefall.freebsd.org>
Date: Sat, 9 Mar 2002 15:23:54 -0800 (PST)
From: wolfram schneider <wosch@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: which(1) ignore empty components of $PATH.
X-Send-Pr-Version: www-1.0

>Number:         35719
>Category:       bin
>Synopsis:       which(1) ignore empty components of $PATH.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 09 15:30:00 PST 2002
>Closed-Date:    Sat Jun 29 22:49:28 PDT 2002
>Last-Modified:  Sat Jun 29 22:49:28 PDT 2002
>Originator:     wolfram schneider
>Release:        
>Organization:
>Environment:
>Description:
      The new c version of which(1) command 
ignore empty components of $PATH.

$ cd /bin
$ env PATH=: which date
$ echo $?
1


It should print:
./date
>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tjr 
State-Changed-When: Sat Jun 29 22:35:49 PDT 2002 
State-Changed-Why:  
This bug no longer exists: 
$ cd /bin 
$ env PATH=: /usr/bin/which date 
./date 
$ uname -r  
4.6-RELEASE-p1 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35719 
State-Changed-From-To: closed->open 
State-Changed-By: tjr 
State-Changed-When: Sat Jun 29 22:40:35 PDT 2002 
State-Changed-Why:  
.. but it does apply to -current. Please do not destroy the Release and 
Environment fields. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35719 
State-Changed-From-To: open->closed 
State-Changed-By: tjr 
State-Changed-When: Sat Jun 29 22:49:02 PDT 2002 
State-Changed-Why:  
Rev. 1.4 of which.c corrects this problem. Thanks for pointing it out. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=35719 
>Unformatted:
