sending messages

I have a two processes which would like to send messages to each
other.
But in order to send messages to another process you need to know the

pid and cid of the process who owns the channel. How can I get this
information from another process?

ie. processA has created the channel, now processB needs to
ConnectAttach() but doesn’t know anything about processA (pid,cid
etc…)

i know that name_attach from server side and name_open from client
side would work but is there anyother solution other than attaching
the process to a namespace?

jinma wrote:

I have a two processes which would like to send messages to each
other.
But in order to send messages to another process you need to know the
pid and cid of the process who owns the channel. How can I get this
information from another process?

Via the pathname space would be the usual way (eg name_attach() and
name_open()). But you’ve said you don’t want that. So another way
for the server to advertise would be to just write its pid/chid
details into a known file (perhaps in /dev/shmem), and have clients
read from there and use that to open the connection. Or you could
walk through /proc/ looking for your program (by name) and then
find what chid the thread was waiting on (discover rather than
notify). Of course, pathnames are the more “QNX6 approach”.

thanks