OpenQNX :: The QNX Community Portal

Jul 25, 2008 - 03:57 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 21 unlogged users and 4 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
sabtain
Post subject: PId from a process name  PostPosted: Nov 16, 2007 - 09:30 PM
Guest





Is it possible to find out the pid of a process using process name?
 
   
Reply with quote Back to top
maschoen
Post subject: RE: PId from a process name  PostPosted: Nov 18, 2007 - 01:12 AM
QNX Master


Joined: Jun 25, 2003
Posts: 1045

Approximately
 
 View user's profile Send private message Send e-mail Visit poster's website  
Reply with quote Back to top
Colin Burgess
Post subject: Re: PId from a process name  PostPosted: Nov 18, 2007 - 02:24 AM
Guest





Take a look at the source to slay or pidin. Basically you will have to traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE devctl on each
to fetch out the name.

sabtain wrote:
Quote:
Is it possible to find out the pid of a process using process name?



--
cburgess@qnx.com
 
   
Reply with quote Back to top
sabtain
Post subject: Re: PId from a process name  PostPosted: Nov 19, 2007 - 06:25 PM
Guest





I have the process names, I need PID


"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fho7ht$rap$1@inn.qnx.com...
Quote:
Take a look at the source to slay or pidin. Basically you will have to
traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE
devctl on each
to fetch out the name.

sabtain wrote:
Is it possible to find out the pid of a process using process name?

--
cburgess@qnx.com
 
   
Reply with quote Back to top
Colin Burgess
Post subject: Re: PId from a process name  PostPosted: Nov 19, 2007 - 06:30 PM
Guest





Unfortunately you have to go through every pid, fetch it's name, and check to see if
it matches the name you already have. That is what slay and pidin do.

sabtain wrote:
Quote:
I have the process names, I need PID


"Colin Burgess" <cburgess@qnx.com> wrote in message
news:fho7ht$rap$1@inn.qnx.com...
Take a look at the source to slay or pidin. Basically you will have to
traverse

/proc/[0-9]*/as with readdir and then issue a DCMD_PROC_MAPDEBUG_BASE
devctl on each
to fetch out the name.

sabtain wrote:
Is it possible to find out the pid of a process using process name?
--
cburgess@qnx.com



--
cburgess@qnx.com
 
   
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.