News for hackers. Stuff that matters.
Re:Kill Me Softly – Kill processes in a reliable manner by pepve on Tuesday December 16, 2014 @04:58PM (#8759831)
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
  }
Re:Kill Me Softly – Kill processes in a reliable manner by lomnakkus on Tuesday December 16, 2014 @05:37PM (#8760031)
I 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 :).

Re:Kill Me Softly – Kill processes in a reliable manner by pepve on Tuesday December 16, 2014 @05:57PM (#8760117)
It 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.

Re:Kill Me Softly – Kill processes in a reliable manner by hyperpape on Tuesday December 16, 2014 @07:55PM (#8760501)
What they want is a fuzzer: send SIGTERM and/or SIGKILL with arbitrary durations between them.
Re:Kill Me Softly – Kill processes in a reliable manner by dimman on Tuesday December 16, 2014 @05:17PM (#8759938)
I'd recommend adding some kind of max retries mechanism because otherwise, if process ignores SIGTERM for instance, you can wait forever.
Re:Kill Me Softly – Kill processes in a reliable manner by pepve on Tuesday December 16, 2014 @05:41PM (#8760049)
I 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.
Re:Kill Me Softly – Kill processes in a reliable manner by khrf on Tuesday December 16, 2014 @05:21PM (#8759955)
And again you'll get this:

> This tool will hide or allow you to ignore important issues with your system.