I was not checking whether the signal handler has been overwritten to ignore the signal leading to infinite busy loops :)