Hi,

we're still getting complains about inconsistent behavior with unset PATH 
variable, so we'll have to fix it one way or the other. We'd like to know what 
behavior did you intend and what is correct so we won't differ in the future.

After 'unset PATH' only executables that are specified with full path works, 
but man page mentions also executables in current directory should work:

"""The default path is /bin:/usr/bin: (specifying /bin, /usr/bin, and the 
current directory in that order)."""

We've found BASH has this behavior (current directory is used for default path 
after PATH is unset), but pdksh, mksh, zsh, csh does not work (only 
executables with full path specified work).

What behavior is correct for ksh?

Thanks
Michal Hlavinka



On Friday 05 March 2010 10:01:01 Tomáš Smetana wrote:
> Hello,
>   the manual page for ksh says in the "Execution" section that "The 
> default path is /bin:/usr/bin: (specifying /bin, /usr/bin, and the current
> directory in that order).".  I don't think this is (always) correct -- at
> least on my i386 Linux machine:
> 
> $ pwd
> /home/tsmetana
> $ touch foo.ksh
> $ chmod +x foo.ksh
> $ export PATH=/bin:/usr/bin:
> $ foo.ksh
> $ unset PATH
> $ foo.ksh
> ksh: foo.ksh: not found [No such file or directory]
> 
> As you can see, when I explicitly set the PATH to what is supposed to be
> the default it searches the current directory.  However the (real) default
> path seems to search only /bin and /usr/bin.
> 
> The default search path seems to be configurable at the compile time and
> there is some inconsistency between the defaults in
> lib/libast/comp/conf.tab and cmd/ksh93/data/msg.c e_defpath[] constant
> which looks to be used in the case the ast configuration PATH value is not
> found.
> 
> I believe that not having . in the default path is a more reasonable
> setting so I would like to ask you to fix the manual page and eventually
> change the fallback value too.  Also it seems that this is not yet
> documented difference between ksh88 and ksh93.
> 
> Thank you and regards.

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to