On Thu, Mar 24, 2016, at 10:24, Tony Finch wrote:
There was only ever one instance of the
program running, but its pid changed hundreds of times per second.
Since it had daemonized, I couldn't use process groups to kill it.
Since it was running as root, I couldn't use `kill -TERM -1` to kill just
one user's processes.
Since it was a production server, I reslly didn't want to reboot.
I tried picking a pid somewhat larger than the program's rapidly
increasing pid, and ran a script: while !kill $pid; do :; done
Out of a curiosity, if a C program executes kill(-1, SIGSTOP), will it
itself be stopped? Or can SIGSTOP be ignored?
If so, maybe you could have solved it by stopping everything and then
continuing everything but the offending program. Of course, then you
risk that other programs on the system may have side effects from being
stopped and continued (interrupted system calls they may not be able to
handle, etc)