Problem with message system

From: Joerg Wittenberger <joerg.wittenberger_at_nospam.org>
Date: Sun Jan 22 1995 - 07:54:00 PST

Hi,

I ran into a serious problem with the message system.

Assume I have a "normal" client / server interaction pending.
If I kill the client process, the kernel generates a M_ABORT for the
server. The sever answers and the client will receive the signal.
If I kill the server the kernel ensures that all pending requests see
an I/O error.

But I have a thread acting as a server for threads of the same process.
If I kill the process I see no way to ensure that all pending requests
get rolled back. Thus my process works fine except I try to kill it.
Then it'll hang forever.

Any idea how to solve that?

A second question: While I see (at the moment) no solution for the
above I can't exit my process in a really clean way anyway. I tried
to notify() the client threads (which correctly generates the M_ABORT)
then wait until they are gone and then notify() the server thread.
Unfortunatly I'm either to stupid to call wait_pid() correct or it
doesn't work right. Anyway if I call wait_pid() it immediately
returns. Thus I'm going to kill the server thread before all the
M_ABORT's are done:-( Currently I just sleep() for 2 seconds after the
wait_pid() to give them a chance, but that's certainly not the
solution I'm looking for.
Here the essential code snippet:

long t=tfork(somthing);
...
notify(0,t,EKILL);
wait_pit(????);

Any help appreciated.

Thanx
/Joerg

-----------------------------------------------------------------------------
Joerg Wittenberger | email: joerg.wittenberger@inf.tu-dresden.de
Rietzstr. 32b |
01139 Dresden | http://www.inf.tu-dresden.de/~jw6
Germany | PGP: D4 B2 DA AE C3 02 50 9C 45 3E AD 99 C1 1A 8E F8
Received on Sun Jan 22 07:18:29 1995

This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:17 PDT