captures system call interruptions to better handling of Ctrl-C