3 ms·
The central thing about all these conventions is they developed in the absence of good union mounts. In Plan 9 there is no $PATH: all such things are bound into
by gchpaco 15y ago
The central thing about all these conventions is they developed in the absence of good union mounts. In Plan 9 there is no $PATH: all such things are bound into /bin. This works both because Plan 9 has very good union mounts, but also because those union mounts can be localized to a specific process and as a result are user accessible. I seem to recall some work was done to make this possible on Linux but It didn't get accepted into the main kernel because it is at odds with how we see how a Unix system should behave.
It would be interesting to see a Linux distro that embraced this.
- pmarin 15y agoI wonder why rc still has $path in Plan9. term% echo $path . /bin What happen with Ape ports whom expect the path environment variable?
- 4ad 15y agorc has $path because rc predates Plan9, it first appeared in tenth edition Unix. Inferno's shell doesn't use a $path variable.
- p9idf 15y agoApe's execlp() tries first the program name passed to it (be it relative or absolute), and if that fails it prepends "/bin/" and tries again. It ignores environment variables entirely.† Rc's path variable allows you to easily tell rc to check the current directory when looking for programs to exec. Doing that with bind after each cd would be clumsy. And if your working directory is a remote server, you can set path to just /bin so that you aren't statting the remote directory before each exec. Inferno's sh does use a path variable, but it is typically left unset and the default (/dis .) is used.†† † See http://plan9.bell-labs.com/sources/plan9/sys/src/ape/lib/ap/plan9/execlp.c http://plan9.bell-labs.com/sources/plan9/sys/src/ape/lib/ap/... †† See /usr/inferno/appl/cmd/sh/sh.b:/^runexternal