My Bag of Squid

.. to kick down the beach. So stand back.

Friday, September 03, 2010

Python and Signals -- Or, Blind Ignorance and Luck

use Yum.  Go ahead, I dare you.

Why is it that python apps don't seem to have a proper understanding of signals?  Is it bad programming or is it a bad interpreter?  It's so very frustrating when one is doing anything - A N Y T H I N G - via yum, cobbler or any similar snakeball, and wants to, well, do something else.  If one is lucky enough to kill the current python process, the chance of killing the subshell from the system() call is nothing like guaranteed.  Rsyncs will spin off in the weeds, happy little ronin processes.  A yum update will still try to download the same files forever, even if, as in a very recent case, the INTR was given in the hopes of changing that behaviour.

What do we have to do?  Run every python script in a subshell of its own, like a very light firebreak?  If we fucking gun this quarantine process, I bet it'll still splatter mutant subprocesses all over the table either way.

I only wish I could hit the CTRL-C harder and that it could somehow inflict pain on the python interpreter when I did.  Such is the frustrated cruelty I feel towards the half-baked crap I fear is being passed-off as the only tools we have left.

Labels: