• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 247
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

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