okay@tafs.mitre.org (Okay S J) (10/14/89)
>From: "W. David Rohwer" <rohwerwd@csusac.ecs.csus.edu> >Newsgroups: comp.sys.amiga >Subject: Suggestion for kill command. >I have a suggestion for the next version of the OS. Can you include >a command to kill a process like the UNIX kill command? It would make it >easier for me to free up resources if a program goes out to lunch. Also, it >would prevent me from doing a warm reboot of my machine. >-- Agreed...it would be of immense benefit if you could simply do something like a 'kill 9' on a hung process. I'm actually kind of surprised it doesn't exist right now. Severity levels would be nice, but they don't have to be as extensive those provided by UNIX or other OS's. Something along the lines of a terminate-when-possible and the more drastic die-now! would probably be enough. 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 ----------------- OKAY@TAFS.MITRE.ORG Disclaimer:'My employer doesn't pay me enough to express their opinions'
jonabbey@walt.cc.utexas.edu (Jonathan Abbey) (10/15/89)
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.
jdm@gryphon.COM (John Mesiavech) (10/15/89)
In article <1661@nigel.udel.EDU> okay@tafs.mitre.org (Okay S J) writes: >>From: "W. David Rohwer" <rohwerwd@csusac.ecs.csus.edu> >>Newsgroups: comp.sys.amiga >>Subject: Suggestion for kill command. >>I have a suggestion for the next version of the OS. Can you include >>a command to kill a process like the UNIX kill command? It would make it >>easier for me to free up resources if a program goes out to lunch. Also, it >>would prevent me from doing a warm reboot of my machine. >>-- > >Agreed...it would be of immense benefit if you could simply do >something like a 'kill 9' on a hung process. I'm actually kind of surprised >it doesn't exist right now. Severity levels would be nice, but they don't Ah, kemo sabe, your wish is a PD command! Seriously, get thee hence to your favorite BBS or commercial service, and download a PD program called AskTask. Within you will find a program (with source, yet!) to do EXACTLY as you command, via: 1) Reducing the task priority down to nothing, so it eats no CPU time; 2) Sending Signals to the task to stop (by setting it's Wait() bits directly) 3) Fircing the task to do a DOS Exit(), or 4) Directly RemTask()ing it. Either way, the task is gone. Works on everything I've tried it with..... If you can't find it on any local to you BBSsm send mail to jdm@gryphon.com and I'll send you the UUEncoded zoo file. John (.sig under reconstruction>
karl@sugar.hackercorp.com (Karl Lehenbauer) (10/15/89)
In article <19591@ut-emx.UUCP> jonabbey@walt.cc.utexas.edu (Jonathan Abbey) writes: >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 is pretty much already in there. There's a control-C signal bit. Get everyone to start supporting it, and I guess you'd need a control-C-sender for workbench-launched tasks. And the sorts of errors that the processor can detect, like illegal instruction, odd address (where relevant) and such can already be trapped, too. One thing is, when your application communicates programs and such, it can be very tricky to get everything to safely back out anyway. [Followups to comp.sys.amiga.tech] -- -- uunet!sugar!karl "There is hopeful symbolism in the fact that -- flags do not wave in a vacuum." -- Arthur C. Clarke -- Usenet access: (713) 438-5018
fgd3@jc3b21.UUCP (Fabbian G. Dufoe) (10/16/89)
Everybody agrees it would be great to have a kill command. However, it's not possible with the Amiga. Sure, you could have a command that aborts a process. But you want a kill command to (1) terminate a runaway process and (2) free its resources. Since AmigaDOS doesn't track resources there's no way to free resources except for the process to do it. This hasn't been a major subject of discussion for almost two years. --Fabbian Dufoe 350 Ling-A-Mor Terrace South St. Petersburg, Florida 33705 813-823-2350 UUCP: ...uunet!pdn!jc3b21!fgd3