Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!mpirbn!p554mve From: p554mve@mpirbn.UUCP (Michael van Elst) Newsgroups: comp.sys.amiga.tech Subject: Re: CreateProc Message-ID: <545@mpirbn.UUCP> Date: 8 Feb 90 15:24:22 GMT References: <723@tau.sm.luth.se> Reply-To: p554mve@mpirbn.UUCP (Michael van Elst) Organization: Max-Planck-Institut fuer Radioastronomie, Bonn Lines: 27 In article <723@tau.sm.luth.se> Karl-Gunnar Hultland writes: >How do I know when a process created with the AmigaDOS >CreateProc exits?? >The main process is responible for unloading the segmentlist >and I can't do it unless the process is ready. The common way is to send the process a startup message that is fetched from its startupcode. The process the replies on the message if it terminates. The Reply has to be done in Forbidden state, so the parent isn't awoken before the child process is actually removed from the process list. This method is used by Workbench. >Is there a better way to start multiple processes from a main program >than to use CreateProc.( I use Lattice C 5.04 ) It's a basic method, nevertheless, standard CreateProc is used with modules that are LoadSeg'd into memory and it's a little tricky to start processes running on the same code segment as the parent. Lattice provides some new functions that do this in a simpler way. Both can only be used to run processes that work similar to workbench applications. You can't pass a commandline and stdio file handles in the usual way (it depends on the startup code). And you'll NEVER run BCPL programs like the standard CLI commands. These can be started only via the AmigaDOS call Execute(). Michael van Elst uunet!unido!mpirbn!p554mve