Thanks in advance,
-Mark Eliot
Engineer
SRI Int'l
Look at qnx.psinfo() and the related structure in /usr/include/psinfo.h
--
b...@cyberdex.cuug.ab.ca | Cyberdex Systems | Just because you're not
mill...@cuug.ab.ca | c/o Trever Miller | paranoid doesn't mean
| Suite 557, 918 16Ave. N.W.| that they aren't out to
PGP mail accepted here | Calgary, Alberta T2M 0K3 | get you.
> In QNX 4.2, I'm looking for a way to get the pid of a process
>by only knowing its name. Say I know that process "Foobar" is
>-Mark Eliot
The way to obtain the pid of an already running process is to perform
a qnx_name_locate() in the calling process (ie. process requiring pid)
This will find the pid assuming that a qnx_name_attach() was performed
on the first process.
Emlyn Garvey
em...@graph.moldflow.oz.au
Most things dont attach
and it may return a vc to another node.
Try doing a qnx_psinfo()
and have a look in sys/psinfo.h
there is a name field in one of the structures.
Ok, you say, you need the pid to call qnx_psinfo()
well, so you have got to do call it for every pid
until you find it. If the pid does not exist
it will get the next valid one. This makes a search
easy(ier?)
Read the lib book entry.
DN
I aint done this, but another guy here has
and it does work.