1832286 Members
2504 Online
110041 Solutions
New Discussion

process environment

 
Sergey Akifiev_1
Frequent Advisor

process environment

i wonder how does one can find out environment variables of arbitrary process.
in linux we have /proc//environ. but what to do in hpux?
3 REPLIES 3
A. Clay Stephenson
Acclaimed Contributor

Re: process environment

There is no equivalent in HP-UX to the /proc filetree. The getenv() function can be used within the process but if you are talking about unrelated processes then using a debugger to attach to a the process is about as close as you get.
If it ain't broke, I can fix that.
Sergey Akifiev_1
Frequent Advisor

Re: process environment

so we have a adb debugger as well as ported gdb. what can be done with this tools?
i cannot find something related to reporting processes's environment in manuals.
Dennis Handly
Acclaimed Contributor

Re: process environment

>so we have a adb debugger

Don't even think of using this.

>as well as ported gdb. what can be done with this tools?

HP's latest wdb can be downloaded from:
http://www.hp.com/go/wdb

>i cannot find something related to reporting processes' environment in manuals.

That's because it is none of your business to look at other processes, only your own. Especially since it isn't easy as using /proc. ;-)

Here are some old threads that explain how:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=763461
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1109088
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1116594