Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!mips!bridge2!jarthur!uunet!cbmvax!andy From: andy@cbmvax.commodore.com (Andy Finkel) Newsgroups: comp.sys.amiga.programmer Subject: Re: CShell 5.10, arp stuff, A3000 w/2.0; should they go together Message-ID: <22019@cbmvax.commodore.com> Date: 29 May 91 23:38:43 GMT References: <1845@contex.contex.com> <37100008@hpfcdc.HP.COM> Reply-To: andy@cbmvax.commodore.com (Andy Finkel) Organization: Commodore, West Chester, PA Lines: 31 In article <37100008@hpfcdc.HP.COM> koren@hpfcdc.HP.COM (Steve Koren) writes: > >> RunCommand(seglist,stacksize,arguments,argument length). This is what >>is used by the system shell to run commands on your process. > >Well, I admit I don't have the docs for RunCommand, but from the arguments >to it listed above, it appears there is no way to redirect input and >output to the command. If true, that would make it unusable for a shell. > > - steve Nonsense. It's perfect for a shell. In fact, its what our shell uses. :-) I parse the redirection arguments from the command line first, set the process inputs and outputs from the redirection, then call RunCommand with the reduced command line. When you call something like System("dir >ram:qwe") a shell process is fired up, the parsing takes place, and RunCommand eventually gets called. There's nothing wrong this that approach; but having direct access to RunCommand makes it possible for user shells to have the same abilities as the built in shell. andy -- andy finkel {uunet|rutgers|amiga}!cbmvax!andy Commodore-Amiga, Inc. "The best way to do video effects on a Mac is to use an Amiga." Any expressed opinions are mine; but feel free to share. I disclaim all responsibilities, all shapes, all sizes, all colors.