https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217144

Konstantin Belousov <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
             Status|New                         |Closed
         Resolution|---                         |Works As Intended

--- Comment #2 from Konstantin Belousov <[email protected]> ---
This is perfectly normal.  Kernel can reliably see the environment for a
process only during execve(2), when old program passes the environment to a new
executed program through the syscall.  New program (address space) gets the
envirnment as a set of strings on top of the main thread stack.  procstat -e
best guess is to access these strings and show them as good enough
approximation.

During the normal operations, the environment changes do not need to be
reflected into the strings and they are not, as you discovered.  Still procstat
-e is useful because typical program only consumes the environment without
changing it.  Shells of course do change env vars, but maintaining env as
externally visible strings set is not needed until something is execed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-amd64
To unsubscribe, send any mail to "[email protected]"

Reply via email to