Test SCO Xenix IPC reliability

Chip Rosenthal chip at vector.UUCP
Thu Sep 1 10:53:41 AEST 1988


A couple of comments and questions about the IPC test program -- the
shared memory version, not the message queue one.

>int	zero = 0;
>int	*loc = &zero;

Why is loc being set here?  One of the first actions in main() is:

>	if ((loc = (int *) shmat (id, (char *) 0, 0)) == (int *) 0) {

I don't understand the purpose of "zero".  Can anybody help out?

Second, wouldn't it be more realistic to drop the pause() and just do
a polling loop?  I would change:

>		while (*loc)
>			;

to something like:

>		while (*loc)
>			sleep(1);

In a multi-processing package, it is reasonable to fix the IPC service
id number to a known value.  (Grrrr...I've heard the performance arguments.
I *still* wish IPC mapped to a filesystem name rather than using a stupid,
magic ID number.)  But, is it realistic for the service requestor to know
the PID of the service server?  Furthermore, this would get rid of the
bugs which have been pointed out.  All of which are with signals and not
SysV IPC.  And we all know how reliable signals are :-(
-- 
Chip Rosenthal     chip at vector.UUCP | I've been a wizard since my childhood.
Dallas Semiconductor   214-450-0486 | And I've earned some respect for my art.



More information about the Comp.unix.xenix mailing list