Respecting Unix signalsThere is a certain class of program that decides it knows better than you about when you should be able to stop its operation. The most irritating way to do this is to catch ^C (and even ^\); such programs win a modest prize from me, usually awarded with 'kill -9'. Yes, some operations are dangerous if interrupted half-way through and programs need to protect themselves against them. Short operations. It is very rare that a program needs to block signals for very long, and when it does it should take receiving a ^C as a sign that it needs to shut down as soon as it can. (The Solaris patch process may block ^Cs for a long time, but that's more a sign that it's achingly slow and desperately needs to be fixed than anything else.) The most irritating programs pay some attention to ^C, but not enough to actually exit or stop. They'll notice your desire for them to stop, but reinterpret it as, oh, 'interrupt the current network transfer' instead of actually stopping. A tragic example of this is Red Hat's An example of handling this issue well is |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |