Pulse Sender.

We’ve got two processes: P1 and P2. P1 creates channel (name_attach) and waits for a pulse (MsgReceive). P2 connects to the channel (name_open) and sends a pulse to P1 (MsgSendPulse). P1 receives the pulse (MsgReceive). The question is: how P1 can get pid of P2 without sending this information to P1? Is it possible at all?

For what you need, that p1 know pid of p2. I think you problem will be solved in another way. Write what you want to do with this pid?

I’m translating some application from QNX 4 to QNX 6. This application uses pids not only to communication, but also to processes registration. I do not want and I have no time to modify a code in such a way that pids wouldn’t be necessary. So I have to get pid of pulse sender after getting a pulse. Is it possible?

You must get pid (getpid() ) in sender process, then send pulse with this pid (int MsgSendPulse ( int coid, int priority, int code, int value - your pid ) ), and when you receive pulse you get this pid. (MsgReceivePulse( int chid, void * pulse, int bytes, struct _msg_info * info )) pulse->value.sival_ptr – this would be you pid.
If you need pid for communication you may use name_attach-name_open and gns(if processes running on 2hosts with QNET).