Path: utzoo!utgpu!attcan!uunet!convex!killer!vector!chip From: chip@vector.UUCP (Chip Rosenthal) Newsgroups: comp.unix.xenix Subject: Re: Test SCO Xenix IPC reliability Message-ID: <530@vector.UUCP> Date: 1 Sep 88 00:53:41 GMT References: <22012@neabbs.UUCP> <166@ispi.UUCP> Reply-To: chip@vector.UUCP (Chip Rosenthal) Organization: Dallas Semiconductor Lines: 33 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@vector.UUCP | I've been a wizard since my childhood. Dallas Semiconductor 214-450-0486 | And I've earned some respect for my art.