in reply to true environment

setenv() itself doesn't seem to update /proc/pid/environ. I tried it in C, doing a setenv and a sleep so I could cat /proc/pid/environ from a separate shell. I also tried using fork() and checking /proc/child_pid/environ. No luck. In both cases, getenv() worked right (the value was updated in the parent and the child).