ash shell PATH
Alberto Donato
alberto.donato at gmail.com
Tue Jul 17 03:47:37 PDT 2007
Hello,
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?
IMHO the PATH var should be exported also if set to ash defaults.
Alberto
More information about the busybox
mailing list