simpler implementation of handleSignal - just reinterpreting linux standard signals.