PId from a process name

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

Approximately

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

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

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:

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