3 ms·
Why does a shell need its current environment to be visible in /proc/$pid/env (as opposed to just its initial environment)?
by __david__ 3y ago
Why does a shell need its current environment to be visible in /proc/$pid/env (as opposed to just its initial environment)?
- Blikkentrekker 3y agoBecause the specification of the POSIX shell says that `export` changes the current environment of the running process, not just of any newly started processes. This is useful to recognize various processes I suppose. I have written code that scans the environment of processes to find particular processes and group them together.