Added checks for sigaction() and sigprocmask().