in reply to Getting environment variable of a process

FWIW, RHEL 5 should provide the /proc file system. Since you have the PID and (presumably) sufficient permissions, you could try to read the environment from /proc/PID/environ.

From man 5 proc:

/proc/[pid]/environ
This file contains the environment for the process. The entries are separated by null bytes ('\0'), and
there may be a null byte at the end. Thus, to print out the environment of process 1, you would do:
$ (cat /proc/1/environ; echo) | tr '\000' '\n'
Sorry, no suggestion for the Windows XP part.

Update: It's the environment as seen when the process was invoked. Changes applied to the environment are not propagated - at least not when I tested it under SuSE 11.1, kernel 2.6.27.7.