Solved

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

Posted on 2001-06-18
4
213 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

777 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