Hi. I have a strange problem. I have two processes; one does a
MsgSend(), the other seems to receive a pulse.
Process R is a resource manager. Process C (“client”) spawns several
threads; each of those threads opens process R’s “file”, thereby getting
a connection id. The vast majority of the IPC is done under the guise
of _IO_MSG; the resource manager registers a handler for messages of
that type.
In one thread of process C, I perform a MsgSend() to the resource
manager. This appears to work fine; the subtype is what I expected, and
the data also is good. The only problem: within the _IO_MSG handler
ctp->rcvid is zero. I’m not sure how this can happen; does anyone know
what I’m doing wrong? How can I send a message and receive the data
properly, but not get a rcvid?
I should also point out that other threads within Process C have
successfully sent messages to the resource manager; that is, they have
performed (seemingly identical) MsgSend() calls, and rcvid has been
non-zero within process R.
Hi. I have a strange problem. I have two processes; one does a
MsgSend(), the other seems to receive a pulse.
Process R is a resource manager. Process C (“client”) spawns several
threads; each of those threads opens process R’s “file”, thereby getting
a connection id. The vast majority of the IPC is done under the guise
of _IO_MSG; the resource manager registers a handler for messages of
that type.
In one thread of process C, I perform a MsgSend() to the resource
manager. This appears to work fine; the subtype is what I expected, and
the data also is good. The only problem: within the _IO_MSG handler
ctp->rcvid is zero. I’m not sure how this can happen; does anyone know
what I’m doing wrong? How can I send a message and receive the data
properly, but not get a rcvid?
I should also point out that other threads within Process C have
successfully sent messages to the resource manager; that is, they have
performed (seemingly identical) MsgSend() calls, and rcvid has been
non-zero within process R.
Josh,
This seems to be very odd indeed. I would like to see your
code if you can put together an example of this behaviour
that would be great. Does it happen on a consistent basis?
Hi. This does happen consistently. The code is very long; I’ll see if
I can get a more concise example thrown together, and post it. If not,
I’ll report that too.
What’s really odd is that if I comment out the one trouble spot, later
communications from the same thread seem to work fine.