The right way to deal with frozen processes on Unix
blog.phusion.nl
blog.phusion.nl
You can acheive the same results with other app servers, but you're going to have to do a lot of the heavy lifting yourself. I'm not ashamed to admit that I have a lot more confidence in Passenger's solution than I do my own.
pgrphack sh -c "processes"
Kill the pid for the sh ("agent") and you thereby kill all the processes?Again, sorry for the noob question. I'm still learning and making mistakes.
Say the PGID I get for sh is 321. If I do
kill [signal] 321
that will not kill all the processes having PGID 321?If it would not kill them, then couldn't we modify kill(1) to be able to call kill() with a negative integer as you describe?
Sorry for the noob questions. I am still learning and making mistakes.
The halting problem is unsolvable because _very particular_ (and pathological) cases are unsolvable. If a process is in a loop between the same instructions at the same states, it's very easy to tell that it's not going to halt -- the only challenge is that you can't make this determination for all processes all the time.
Mathematically, note that the concept of an oracle for the halting problem is well-defined (and a useful concept).
There are in fact fairly reliable heuristics for noting when things are going pear-shaped. The edge cases get sticky though.