3 ms·
It's not really harmful as long as it's just some shell programs here and there that use it. The problem is when everything starts to rely on it. Hell, in linu
by Galanwe 6y ago
It's not really harmful as long as it's just some shell programs here and there that use it. The problem is when everything starts to rely on it.
Hell, in linux, the dynamic linker (ld-linux.so) depends on procfs to expands ELF variables (e.g. $ORIGIN, which requires the path to the current program being executed, which is retrieved from procfs). It's gone _way_ too far!
Now it does not mean that an other interface would be ugly/annoying to use from the shell.
`sysctl` for instance is quite convenient to use from the shell, and the hierarchical variables that it accepts could very well mirror what procfs exposes.
Something like
`$ sysctl proc.42.environ` <=> `$ cat /proc/42/environ`
- gbrown_ 6y agoI feel Solaris really got this right with its p* commands, e.g. pargs -e 42 or just penv 42 to mirror your example. Whilst in practice they may use a procfs they could use other backends if implemented on other systems without or with a differing procfs. These commands are a much cleaner interface IMHO.