Link to home
Start Free TrialLog in
Avatar of omdon
omdon

asked on

accessing data in /proc using an linux API

I want to write a C program which accesses process information(pid no,tty,etc) using an API. I know how to access the information directly from /proc using system calls(fread(),fopen(),etc). what I want to do is to access the /proc data structure using an API since it makes my program version independent. Also if possible tell me other ways to access /proc data structurs.
Avatar of keramati_h
keramati_h

Hello,
See these man pages:
getpid
getppid
procinfo
proc

ASKER CERTIFIED SOLUTION
Avatar of bryanh
bryanh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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:

Accept: bryanh {http:#8263181}

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

jmcg
EE Cleanup Volunteer