🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11447

Asynch Process creation

#11447
From: Jim Levie
Date: Mon, 13 Feb 1989 06:39
29 lines
1756 bytes
A question for the wizards out there...

I need to be able to (from a CLI process) startup another process that will
run asynchronously, inherit specified input and output streams, and return
exit status to the parent process.  I can't use input and output redirection
because the data streams will need to be used for a succession of sub-processes
and I can't allow the output stream to be opened and closed by each sub-process.
Ideally the sub-processes would be ordinary C programs that read from stdin 
and write to stdout.

Using Manx's fexecv() and mucking about with the pr_CIS and pr_COS I can do it
synchronously, but not asynchronously.  Using Manx's detach isn't any good
either since a 'detached' process doesn't inherit the input and output
streams.

I thought that the ARP ASynchRun() call would do, but I've not been able to
get it to work.  Also I'd prefer not to use something that would require
dependence on something that I did not have source to and that might not work
in later OS releases.

CreateProc() comes close, but I can't see any way to get the input and output
streams set up before the sub-process starts executing.


-- 
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Jim Levie   REMTECH Inc  Huntsville, Al 
 The opinions expressed above are just that.
 Ph.    (205) 536-8581               email: uunet!ingr!b11!jim
Technical Details
Message-ID: <371@b11.INGR.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!steinmetz!uunet!ingr!b11!jim

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!sunybcs!bingvaxu!leah!itsgw!steinmetz!uunet!ingr!b11!jim
From: jim@b11.INGR.COM (Jim Levie )
Newsgroups: comp.sys.amiga.tech
Subject: Asynch Process creation
Message-ID: <371@b11.INGR.COM>
Date: 13 Feb 89 06:39:44 GMT
Organization: Far from the halls of Amber
Lines: 29