Solved

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

Posted on 2001-06-18
4
210 Views
Last Modified: 2010-04-21
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
Comment
Question by:tonitop
4 Comments
 
LVL 3

Accepted Solution

by:
superschlonz earned 25 total points
ID: 6204588
try reading /proc/<pid>/cmdline
0
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 25 total points
ID: 6242185
if your OS does not support /proc filesystem, check if it has kvm_*() procedures (like on Solaris)
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9868856
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
This video discusses moving either the default database or any database to a new volume.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now