SWI-Prolog Did You Know Did you know? SWI-Prolog can handle Unix signals Search Documentation:
Predicate set_prolog_IO/3