Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!columbia!rutgers!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: The other half of RUN! Message-ID: <2223@cbmvax.UUCP> Date: Fri, 14-Aug-87 11:04:52 EDT Article-I.D.: cbmvax.2223 Posted: Fri Aug 14 11:04:52 1987 Date-Received: Sun, 16-Aug-87 02:29:48 EDT References: <3873@garfield.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 41 in article <3873@garfield.UUCP>, markr@garfield.UUCP (Mark Dawson) says: > > The first thing you make in a multi-tasking DOS like AmigaDOS is > RUN. (A very nice command!) The next one is KILL. (Excuse me? No kill > command?) > > I want to be able to say kill task 2 and have what ever task 2 is > or was to end and go away! If you can make or have such a command that > I can add to my C dir please post it to this group. Without complete resource tracking, a task can't just be indiscriminantly killed. However, since all tasks are likely to know how to shut themselves down, there's already a command that works very much like the KILL command you propose. It's the Break command. You'd type something like: 1> Break task 3 e What this will do is set the ^E signal in task 3 (you could also specify the ^C, ^D, or ^F signals). A properly written program will see this via either a polling or an exception, and shut itself down. Try this with the Dir command, which responds to ^C. Start up a background Dir (in it's own window to make things easier on yourself), like: 1> run Dir >con:10/10/200/100/DirWindow opt a [CLI 2] And you see Dir chugging away in it's window. If you then type: 1> break task 2 c you'll shut down the Dir window as Dir responds to the ^C signal. And that's really all there is to it. Not as powerful as a UN*X "kill -9", since the task being killed must cooperate, but useful nonetheless. > Joseph Robert Dawson > NOT: Mark Dawson -- Dave Haynie Commodore-Amiga Usenet: {ihnp4|caip|rutgers}!cbmvax!daveh "The A2000 Guy" PLINK : D-DAVE H BIX : hazy "I'd rather die while I'm living, than live while I'm dead" -Jimmy Buffett