[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

How do I get the argv[] if I know the process id?

I have process id, how do I get the argv[] of that process?
I didn't create that process and I don't know anything about it?
I'm usin C/C++.
0
tonitop
Asked:
tonitop
2 Solutions
 
superschlonzCommented:
try reading /proc/<pid>/cmdline
0
 
ahoffmannCommented:
if your OS does not support /proc filesystem, check if it has kvm_*() procedures (like on Solaris)
0
 
jmcgOwnerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Splt: superschlonz {http:#6204588} & ahoffmann {http:#6242185}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now