Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!ut-emx!walt.cc.utexas.edu!jonabbey From: jonabbey@walt.cc.utexas.edu (Jonathan Abbey) Newsgroups: comp.sys.amiga Subject: Re: Suggestions for a kill command Summary: Well, why not? Keywords: kill Message-ID: <19591@ut-emx.UUCP> Date: 14 Oct 89 19:39:44 GMT References: <1661@nigel.udel.EDU> Sender: news@ut-emx.UUCP Reply-To: jonabbey@walt.cc.utexas.edu (Jonathan Abbey) Organization: The University of Texas at Austin, Austin, Texas Lines: 34 In article <1661@nigel.udel.EDU> okay@tafs.mitre.org (Okay S J) writes: >Out of curiosity, how difficult would this be to do?--You'd just have to >get the PID of the offending process and then force a hangup or vacate (no >flames please, I don't the amiga lib calls memorized) right? (assuming >worst case where you there's no way out but to just kill it and forget >finishing I/O). >---Steve Actually, I don't think it would be all that difficult.. all it would take (Quick! Check the RKM Jon:... got it!) would be an expansion to the Task structure similar to tc_ExceptCode and tc_TrapCode, perhaps tc_ExitCode with an accompanying tc_ExitData (containing an intuition RememberKey, for instance), that points to a routine to be executed upon exit from a task, either through a kill signal, normal exit from main code, or an unsalvageable task crash. This could be implemented similar to the fattenlayerinfo() hack that was used in 1.1. i.e., a simple task structure would be send to AddTask, and the main code would call SetExitCode() or some such. Otherwise, one could define a task superstructure, and call a modified AddTask to add the task to the system. This might have some compatibility problems with the process structure though. Of course, the exit code would not be called if SetExitCode() was not called. If it the exit routine were called, the main task code would be halted. This system would require that the main code keep the tc_ExitData up to date at all times.. Actually, I think ARP implements something similar, but I've not had opportunity to work with the ARP library yet. (??) // /\ /\/\ | Jonathan Abbey - jonabbey@doc.cc.utexas.edu - (512) 926-5934 \X/ / \ / \ | Wanted: Programmers interested in 3d graphics/modem games.