QNX 4 Process Identification: HELP!

Hi!
I known executable file name of running process.
How can i get it PID from my C programm.

“Ivan Kulkov” <guard@crypto.ru> wrote in message
news:9ujbhm$eeh$1@inn.qnx.com

Hi!
I known executable file name of running process.
How can i get it PID from my C programm.

Check the documentatin for qnx_psinfo(). The doc contains
a little snippet of code that browse through all processes.
That’s what you have to do, you compare the name you
are looking for against each and every process.

What is it you need the PID for?

Mario Charest <mcharest@clipzinformatic.com> wrote:

“Ivan Kulkov” <> guard@crypto.ru> > wrote in message
news:9ujbhm$eeh$> 1@inn.qnx.com> …
Hi!
I known executable file name of running process.
How can i get it PID from my C programm.


Check the documentatin for qnx_psinfo(). The doc contains
a little snippet of code that browse through all processes.
That’s what you have to do, you compare the name you
are looking for against each and every process.

What is it you need the PID for?

Why do you need the pid? Would it be better to use the name location
mechanisms by having the process attach a name with qnx_name_attach() and
you find it with qnx_name_locate()?

Searching by a string compare on process names is neither efficient nor
neccessarily dependable. (Multiple matches, etc)

-David

QNX Training Services
I do not answer technical questions by email.