On 02/21/2014 11:38 PM, Kevin Chadwick wrote: > previously on this list hero...@gentoo.org contributed: > >>> And grepping through the output of "ps" or similar is not what >>> I would consider reliable and robust either. >> >> Nod. grepping `ps` is what we should avoid at all cost. > > All cost? While I like OpenRC and thanks to Gentoo for it and like > your mention of each to there own (I am no old-nerd by the way). I have > to disagree.
Kevin, I don't think you understand the reasoning behind this. Again, the problem the init system has to solve here is being able to track a process with a 100% accuracy, so whatever automated mechanisms you have configured when certain situations occur, they have to find the correct process to work on as to not kill the daemon instance you actually still need. And, to my current knowledge, this is not possible without a mechanism like CGroups. Whether you rely on PID files or grep through the output of "ps" or use "pidof", either of them are fragile and prone to fail. I elaborated in my actual real-life case how PID files are prone to failure - I am aware that the situation with the full filesystem shouldn't occur in the first place, but, well administrators are just humans after all - and, using "ps" to track the process you are looking for to be able to restart, stop or kill it, can obviously be easily tricked into failure as well. Just imagine some other (malicious) process using the same name as well or when you need to control different instances of the very same process. "pidof" might help when you have the full path. But how does that keep you from working on the wrong instance? I have been looking for a solution of solving that problem without CGroups, but I haven't really found one yet. Do you know one? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5307d8ff.1000...@physik.fu-berlin.de