Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the psinfo structure from /proc

Status
Not open for further replies.

casualty

Programmer
Apr 11, 2001
1
GB
Once I have read the /proc psinfo file for a given process id, can anyone tell me the best way to get the name of the command from argv[0]? The structure provides the argument list (pr_psargs) and the address of the initial argument vector (pr_argv). How could I read just argv[0] from either pr_psargs or pr_argv?
Any help would be appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top