home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!seismo!darwin.sura.net!spool.mu.edu!agate!doc.ic.ac.uk!warwick!pavo.csi.cam.ac.uk!cl.cam.ac.uk!crj10
- From: crj10@phx.cam.ac.uk (Clive Jones)
- Newsgroups: comp.sys.acorn
- Subject: Re: kill apps from cli?
- Message-ID: <1993Jan24.182959.2493@infodev.cam.ac.uk>
- Date: 24 Jan 93 18:29:59 GMT
- References: <1993Jan21.125418.13682@aston.ac.uk> <1993Jan22.095903.22140@dcs.warwick.ac.uk>
- Sender: news@infodev.cam.ac.uk (USENET news)
- Organization: U of Cambridge, England
- Lines: 20
- Telephone-Messages: +44 223 33 4900
- Address: Christ's College, Cambridge CB2 3BU, ENGLAND.
- Nntp-Posting-Host: ashton.cl.cam.ac.uk
-
- In article <1993Jan22.095903.22140@dcs.warwick.ac.uk> thughes@dcs.warwick.ac.uk (Tom Hughes) writes:
- >It's certainly possible to list the running tasks - you just call
- >TaskManager_EnumerateTasks repeatedly, outputing the information. The
- >other question is trickier, as you would have to send a Message_Quit
- >to the task concerned, which can't be done unless you're a desktop
- >task.
-
- You're right about the TaskManager_EnumerateTasks call, provided, of
- course, that you're running under RiscOS3, and haven't rebooted the
- taskmanager recently.
-
- Quitting a Wimp application, however, is far easier than that (a
- Message_Quit can be ignored by the application in any case, even if
- you do send one). All you need to do is call Wimp_CloseDown with
- 'TASK' in one register, and the task_id of the task you want to kill
- in another (I've forgotten the exact register assignments). This
- mechanism is used by module tasks to die in response to service calls,
- even when they may not be the current task.
-
- --Clive.
-