home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / acorn / 10500 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.6 KB

  1. 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
  2. From: crj10@phx.cam.ac.uk (Clive Jones)
  3. Newsgroups: comp.sys.acorn
  4. Subject: Re: kill apps from cli?
  5. Message-ID: <1993Jan24.182959.2493@infodev.cam.ac.uk>
  6. Date: 24 Jan 93 18:29:59 GMT
  7. References: <1993Jan21.125418.13682@aston.ac.uk> <1993Jan22.095903.22140@dcs.warwick.ac.uk>
  8. Sender: news@infodev.cam.ac.uk (USENET news)
  9. Organization: U of Cambridge, England
  10. Lines: 20
  11. Telephone-Messages: +44 223 33 4900
  12. Address: Christ's College, Cambridge CB2 3BU, ENGLAND.
  13. Nntp-Posting-Host: ashton.cl.cam.ac.uk
  14.  
  15. In article <1993Jan22.095903.22140@dcs.warwick.ac.uk> thughes@dcs.warwick.ac.uk (Tom Hughes) writes:
  16. >It's certainly possible to list the running tasks - you just call
  17. >TaskManager_EnumerateTasks repeatedly, outputing the information. The
  18. >other question is trickier, as you would have to send a Message_Quit
  19. >to the task concerned, which can't be done unless you're a desktop
  20. >task.
  21.  
  22. You're right about the TaskManager_EnumerateTasks call, provided, of
  23. course, that you're running under RiscOS3, and haven't rebooted the
  24. taskmanager recently.
  25.  
  26. Quitting a Wimp application, however, is far easier than that (a
  27. Message_Quit can be ignored by the application in any case, even if
  28. you do send one). All you need to do is call Wimp_CloseDown with
  29. 'TASK' in one register, and the task_id of the task you want to kill
  30. in another (I've forgotten the exact register assignments). This
  31. mechanism is used by module tasks to die in response to service calls,
  32. even when they may not be the current task.
  33.  
  34. --Clive.
  35.