And we might as well embrace the Ruby:

    trap 'SIGINT', 'EXIT'
    trap 'PIPE', 'EXIT'