How to get the path of a process after pivot_root in Linux
by andrewdre from LinuxQuestions.org on (#6PXWE)
Hi! Is it possible to find the full path of a process after pivot_root? For example the command: Code:readlink -f /proc/<pid>/exe returns Code:/usr/bin/<program>but it is not correct - it should be Code:/pathToNewRoot/usr/bin/<program> I tried:
Code:ls -l /proc/<pid>/exe
lsof -p <pid>
realpath /proc/<pid>/exeThe result was always the same.
Code:ls -l /proc/<pid>/exe
lsof -p <pid>
realpath /proc/<pid>/exeThe result was always the same.