Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!orsvax1!pyrnj!caip!im4u!ut-sally!pyramid!amiga!robp From: robp@amiga.UUCP (Robert A. Peck) Newsgroups: net.micro.amiga Subject: CORRECTION to prior posting - creating processes Message-ID: <901@amiga.amiga.UUCP> Date: Tue, 25-Mar-86 19:35:08 EST Article-I.D.: amiga.901 Posted: Tue Mar 25 19:35:08 1986 Date-Received: Thu, 27-Mar-86 01:09:59 EST Reply-To: robp@dudley.UUCP (Robert A. Peck) Organization: Commodore-Amiga Inc., 983 University Ave #D, Los Gatos CA 95030 Lines: 45 In my "MULTI-PROCESSING" posting, I made a couple of errors that should be corrected. Semantics, semantics, semantics .... (sigh): -------------------------------------------- MULTI-PROCESSING is a term usually reserved for using multiple processORS rather than starting up multiple proceSSES. Thus this example is multi-tasking, using multiple AmigaDOS processes. Poor AmigaDOS won't know what to do ..... ----------------------------------------- A more serious error was in using the message port that is allocated to the process as my ReplyPort for the return of the startup message. This is a particularly insidious problem in that AmigaDOS has set this message port up for a purpose, that being to receive packets of instructions. If the process sleeps, waiting for an instruction packet to arrive, AmigaDOS may retrieve my returned startup message thinking it contained instructions.... BOOM! Here's the correct way... replacing only a line here and there: in proctest.c, beneath includes, ADD: extern struct MsgPort *CreatePort(); OLD LINE: mainmp = &myprocess->pr_MsgPort; REPLACE BY: mainmp = CreatePort(0,0); /* (should also add error checking to see if CreatePort works ok) */ THEN AFTER LINE: UnLoadSeg(littleSeg); ADD: DeletePort(mainmp); Sorry if anybody had trouble with this one. That port belongs to AmigaDOS. Unless we're actually sending DOS Packets to it, we have to leave that port alone. robp.