Hi,

On 7/17/07, Alberto Donato <[EMAIL PROTECTED]> wrote:
>    I've noticed a strange behavior in ash (bb 1.5.1 and 1.6.1).
>
> If the interactive shell finds the PATH env var set, it exports it and
> using getenv("PATH") from a program run from the shell returns the
> same path as "echo $PATH".
> Instead, if no PATH var is defined at shell startup and ash sets its
> own default paths, these are not exported and getenv("PATH") return
> NULL.
> Doing "export PATH" from the shell make things work.
>
> Is this a desired behavior or a bug?

It matches bash behavior:

$ unset PATH; /bin/bash --norc
bash-3.1$ /usr/bin/env | /bin/grep PATH
bash-3.1$ exit
exit
$ unset PATH; ./busybox ash
/home/vda/srcdev/bbox/fix/busybox.t6 $ /usr/bin/env | /bin/grep PATH
/home/vda/srcdev/bbox/fix/busybox.t6 $

--
vda
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to