It would be nice to trap signals such as int and term to perform a clean exit of the infinite loop.
int
term