3 ms·
I really want to like this. But SIGKILL is such a special instrument in the administrator's toolbox that I don't want it automatically sent after a short timeou
by pepve 12y ago
I really want to like this. But SIGKILL is such a special instrument in the administrator's toolbox that I don't want it automatically sent after a short timeout. Moreover I don't think anyone should want that. This tool will hide or allow you to ignore important issues with your system.
I do unequivocally like the blocking behaviour though, I might implement that for myself.
Edit: so just something like this:
function killwait() {
kill $1
while ps -p $1 &>/dev/null; do
sleep 1
done
}
- dimman 12y agoI'd recommend adding some kind of max retries mechanism because otherwise, if process ignores SIGTERM for instance, you can wait forever.
- khrf 12y agoAnd again you'll get this: > This tool will hide or allow you to ignore important issues with your system.
- pepve 12y agoI personally prefer utilities like this just do one simple task and perform it well. And adding a timeout would just complicate things unnecessarily, compared to the alternative of pressing Ctrl-C when you feel you've waited long enough.
- lomnakkus 12y agoI appreciate the sentiment, but if you think about it... If a process can't be killed arbitrarily at any point during its execution then it's definitely not behaving in a "transactional" way (as in: sort-of-like-ACID-except-the-durability-may-not-be-that-important-as-long-as-consistency-and-atomicity-is-preserved). You really want processes to behave "transactionally", otherwise you'll be really really screwed when the power/UPSs fail. (I'm ignoring the fact that a "kill -9" actually still flushes buffers and such, but that's tangential to the point I'm trying to make.) EDIT: In summary: I'd rather find out sooner rather than later :).
- pepve 12y agoIt seems you still don't want the advertised tool though, because you prefer to just send SIGKILL immediately. Environments differ though, the software I run will do worse on power failures/SIGKILL than on SIGTERM. I would prefer it to be more resillient, embrace a crash-only design, etc. But my world suffers from practicalities, so I deal with it by being careful with SIGKILL.
- deleted 12y ago[deleted]
- hyperpape 12y agoWhat they want is a fuzzer: send SIGTERM and/or SIGKILL with arbitrary durations between them.