OpenQNX :: The QNX Community Portal

May 13, 2008 - 02:16 PM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 56 unlogged users and 1 registered user 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
ranzhang
Post subject: how to find the pid of a process by name..  PostPosted: Mar 13, 2008 - 06:30 PM
Active Member


Joined: Nov 14, 2006
Posts: 31

is there a function that can find the process's id by giving its name?
 
 View user's profile Send private message  
Reply with quote Back to top
ingraham
Post subject:   PostPosted: Mar 14, 2008 - 06:54 PM
Active Member


Joined: Nov 05, 2003
Posts: 56
Location: Texas
Not exactly. If the application has done a name_attach() you can use name_open, although this actually gets you a CHANNEL id, not a pid.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
kwschumm
Post subject:   PostPosted: Mar 15, 2008 - 12:42 AM
Senior Member


Joined: Sep 17, 2004
Posts: 172

There may be multiple instances of a program of any given name, how would you know that you have the right one?
 
 View user's profile Send private message  
Reply with quote Back to top
mario
Post subject:   PostPosted: Mar 15, 2008 - 02:25 PM
QNX Master


Joined: Sep 01, 2002
Posts: 2667

You can loop through the entries under /proc.
 
 View user's profile Send private message Visit poster's website  
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.