Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!agate!bionet!apple!amdahl!oliveb!amiga!boing!dale From: dale@boing.UUCP (Dale Luck) Newsgroups: comp.sys.amiga Subject: Re: aliases and RUN Message-ID: <483@boing.UUCP> Date: 8 Nov 88 17:09:13 GMT References: <5230@louie.udel.EDU> Reply-To: dale@boing.UUCP (Dale Luck) Organization: Boing, Milpitas, Ca. Lines: 56 In article <5230@louie.udel.EDU> kvancamp@ardec.arpa (Ken Van Camp) writes: > > >Someone else said that this would make 'delete cp' expand into 'delete copy', > >which is wrong. Well, the solution is to do this expansion of the second word > >only if the first word is 'RUN'. 'RUN' is magic, there's no way around that. > > > >This is a non-issue in the UNIX world, because the designers realized that > >spawning a process was a magic thing. You do that by 'cp foo bar &' - an > >ampersand at the end of the line. Then there's no first-word second-word > >dichotomy. >Your Unix analogy is not valid. Just because you can do the equivalent >of a RUN in Unix without a separate command doesn't mean second-word alias >expansion is a non-issue. I agree that the unix analogy is not valid but for different reasons. The unix shell starts commands but spawning a task. (Easily done) and 'requires no magic' (which is my argument). The shell than waits for the child to return before continuing. If the shell sees the '&' in the command line it just does not wait for the child to return but continues to process input. So running commands in the background on unix is a function of the shell/cli instead of a seperate spawn program. Which brings up what I believe is a flaw in the amigados cli. It should be spawing a new task whenever you run a command as well. This insures the new task getting a proper launch as well as the command that does run does not get a chance to screw the cli's task information. This is most apparent when you type a cntrl^C while a command is running that ignores cntrl^C. This sets the signal in the cli's task structure such that the next command I type inherits those signals and if it looks for cntrl^C it usually exits immediately. Another case, if you start a command that makes use of the ieee library and you happen to have a 68881 in your system the task switch/launch control saves and restores the context of the 68881 between task switches. Now that program exits, because the program was actually using the cli's task, the entire used state of the 68881 is now being saved and restored by processes the most likely don't care anymore. I think 'run' should be obsoleted for proper cli/shell support of multitasking on the amiga. >No, I can't agree with your arguments. Second words should NEVER be >expanded; that goes against the definition of aliases. Making RUN a special >case is a hack; what about people who prefer RUNBACK or whatever else they >want to use to spawn processes? I agree here, if the cli/shell did the proper thing in the first place with handling background tasks this would not be an issue. -- Dale Luck Boing, Inc. {uunet!cbmvax|pyramid}!amiga!boing!dale Although I do contract work for Amiga-LosGatos, my opinions probably don't represent those of Commodore or its management or its engineers, but I think the world would be a better place if they did.