Rogue
processes can cripple the performance
of a UNIX machine. In the main they are
orphans who, (to retain the familial imagery)
after losing their parent, are adopted
by their grandparents and are lavished
with attention. This attention can come
in the form of all spare CPU resource
(init being the doting grandparent), causing
neighbor processes and applications to
complain bitterly. They're easy to spot,
but not always easy to prevent. One surefire
method of preventing rogues caused by
unexpected process termination is to use
a trap, for example:
trap "exit" 1
2 15
This example will force a Ctrl-D whenever
the program (or environment if the trap
is in .profile) experiences a comms hangup,
interrupt (e.g. Del) or software termination
(default kill). Check your signals list
for more codes.
Next
UNIX Tip |