Operating System - HP-UX
1837958 Members
3666 Online
110124 Solutions
New Discussion

How can I find out what is the environment of a process

 
Fedon Kadifeli_1
New Member

How can I find out what is the environment of a process

Is it possible (maybe through adb) to find out and/or change the environment
variables of a process?
3 REPLIES 3
Randy Mather
Frequent Advisor

Re: How can I find out what is the environment of a process

adb can change system kernel variable values, but I am not sure about a
particular process.
I would not recommend doing this though. Better to research the problem, and
change the kernel, rebuild new kernel and reboot.
What is the problem ?
Fedon Kadifeli_1
New Member

Re: How can I find out what is the environment of a process

I was talking about the process environment variables of a *normal* process,
not the kernel parameters.
David Rodman_2
Occasional Advisor

Re: How can I find out what is the environment of a process

The short answer is to modify the process and rerun it.
You can put in a command to dump the envirnoment to a
file. (e.g. setenv >> /tmp/myenvironment ) there are
equivalent commands for each shell, and for executables.
As far as trying to look inside of a running process from an external viewpoint
and find the environment... Try not to make it too hard on your self!