Jump to content
 English      
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
     Forums advanced search
HP.com Home
IT Resource Center Forums > HP-UX > languages and scripting

Find the variables that store pid value

» 

IT Resource Center

» Login
» Register
» My profile
» Search knowledge base
» Forums
» Patch database
» Download drivers, software and firmware
» Warranty check
» Support Case Manager
» Software Update Manager
» Training and Education
» More maintenance and support options
» Online help
» Site map

Member icons
 
 HP moderator  HP moderator
 Expert in this area  Expert in this area
Member status
ITRC Pro ITRC Pro
250 points
ITRC Graduate ITRC Graduate
500 points
ITRC Wizard ITRC Wizard
1000 points
ITRC Royalty ITRC Royalty
2500 points
ITRC Pharaoh ITRC Pharaoh
7500 points
Olympian Olympian
20000 points
1-Star Olympian 1-Star Olympian
40000 points
2-Star Olympian 2-Star Olympian
80000 points
»  How to earn points
»  Support forums FAQs
Question status
Magical answer Magical answer
Message with a response that solved the author's question
Favorites status
Add to my favorites Add to my favorites
Delete from my favorites Delete from my favorites
This thread has been closed Thread closed
 

Content starts here
   Create a new message    Receive e-mail notification if a new reply is posted  Reply to this message
Author Subject: Find the variables that store pid value      Add to my favorites
Sanjay Yugal Kishore Hassa
Aug 25, 2004 09:48:32 GMT   

Hi,

I have to find the list of variables that store pid value(s) from our legacy products' source code.
The easy part is-
1. Gather all variables that are of type pid_t.
2. Gather all variables that are named as *pid*.

Now the difficult part-
Those variables that are neither of the above types but store values returned syscalls/libraries like getpid(2), getppid(2), fork(2) and so on.
So the question would be-
Where is the best place or rather one-stop-shop to get the list of all hpux syscalls/libraries that either use pid as an input parameter or the return value is a pid value?

Thanks in advance,
Sanjay
Note: If you are the author of this question and wish to assign points to any of the answers, please login first.For more information on assigning points ,click here


Sort Answers By: Date or Points
Jeff Traigle, CSE - HP-UX This member has accumulated 2500 or more points
Aug 25, 2004 09:58:59 GMT  3 pts

You can go to http://docs.hp.com/ and search for PID. You'll want to use the "more options" link to narrow the search to the release you're interested in. For 11.00, I got 300+ hits... without narrowing the search to a release, you get 1100+ hits.
Simon Hargrave This member has accumulated 2500 or more points
Aug 25, 2004 09:59:43 GMT  5 pts

One crude way: -

In the man2.Z directory(s): -

for FILE in `ls`
do
cat $FILE | zcat | nroff | grep -i pid
done

This should unzip and format each man(2) page, and grep for the term "pid". Should give some idea?
Muthukumar This member has accumulated 7500 or more points
Aug 25, 2004 10:07:08 GMT  5 pts

All system calls are defined on header files.

We can check the header files which contains the pattern "pid_t" as

find / -name "*.h" -exec grep -w pid_t {} \;

grep -w --> fixed pattern of pid_t

We can use nm to get into the library contents as,

nm /usr/lib/* | grep pid_t

Regards
Muthu
 
Create a new message    Receive e-mail notification if a new reply is posted   Reply to this message
 
 
Printable version
Privacy statement Using this site means you accept its terms
© 2010 Hewlett-Packard Development Company, L.P.