Did you know? SWI-Prolog can handle Unix signalsSearch Documentation:
SWI-Prolog owl logoPredicate permutation/2