in reply to Setting $0 clears /proc/PID/environ too
The problem is that the process name and /proc/PID/environ are actually windows into the address space of the process. The pointers that determine these windows are in the kernel and the program cannot update them, but you can change the data stored in the region they point to.
Does changing $0 destroy %ENV or does perl copy the environment out of the way before reusing the original environment block?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Setting $0 clears /proc/PID/environ too
by kikuchiyo (Hermit) on Jan 17, 2020 at 09:39 UTC |