rickf@theweav.cts.com (Rick Flower) (03/19/90)
For those of you that may be interested in an easy way to have a single "parent" process load a Re-Entrant "Child" process via the LoadSeg command and spawn it several times, I may have something that may interest you.. Several months ago I was trying to dig up information (any I could find!) on creating processes under AmigaDos.. The information that I found was very limited, but sufficient to get my curiousity running on overtime.. Anyway, I got the software working for the most part, with the exception of a minor bug which I couldn't track down.. Anyway, I came up with the solution in my sleep the other day and now it works 100%.. I can spawn a single child process 6 times (just the arbitrary value I chose) and have each child process dynamically allocate it's own arrays for local storage and each write a file on the VD0: ram disk without problems... I must emphasize that I am ONLY LoadSeg'ing the child once! (for those who were wondering) Anyway, to get to the point, If ANYONE is interested in this code, let me know and I will attempt to either send out a copy to each and every person that requests it -- or if enough interest is shown, I will submit it to comp.sources.amiga.. -- Rick -- -- UUCP: {hplabs!hp-sdd ucsd nosc}!crash!theweav!rickf ARPA: crash!theweav!rickf@nosc.mil INET: rickf@theweav.cts.com
GIAMPAL@AUVM.BITNET (03/20/90)
I've done something like this too, with arp.library's ASyncRun() function. As a matter of fact, I simply aim it at a piece of my code (somefunction name in my program) and then call ASyncRun(). That child can be run several times (assuming it is re-entrant) and can access all dos.library calls, and can even call other functions internal to the program (which should be re-entrant also or implement some kind of locking scheme). As a matter of fact I use this to create child tasks which each manage a seperate window, and all use the same scrolling/menu operation code. Really improves throughput, because if one window is busy printing, you can still do anything you like in any other window --dominic