Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!cernvax!chx400!chx400!bernina!neptune!iiic.ethz.ch!umueller From: umueller@iiic.ethz.ch (Urban Dominik Mueller) Newsgroups: comp.sys.amiga.programmer Subject: How to start INTERNAL residents Keywords: execute, system Message-ID: <24675@neptune.inf.ethz.ch> Date: 13 Feb 91 13:07:51 GMT References: <1991Feb4.171549.28531@nntp-server.caltech.edu> <1991Feb6.190231.1116@jato.jpl.nasa.gov> Sender: news@neptune.inf.ethz.ch Reply-To: umueller@iiic.ethz.ch (Urban Mueller) Followup-To: comp.sys.amiga.programmer Organization: Departement Informatik, ETH, Zurich Lines: 15 I am currently upgrading the Dillon CShell and have a specific problem under Kickstart 2.0. I'd like to start the internal residents (like the Path command) from within my C program. So far the Shell used SyncRun(), but as everybody knows, it only searches the Arp resident list. First I tried to use System() for the job, but as this function creates a new process, commands like CD and PATH won't work. Then I switched to (thanks, Matt) FindSegment() plus RunCommand() plus SyncRunc(). This works fine for normal residents (those made resident using the CLI Resident command) but the INTERNAL residents will show a strange behaviour (of course they need a separate FindSegment()). Once or twice they work, but after that they ignore the command line arguments and read their arguments from stdin! So anybody who's into the specialties of SYSTEM internals please email me a working source or ask for my faulty version. I'll post the results here. -Urban (umueller@iiic.eth.ch)