Implement signal handling for unix.