Switched from signal() to sigaction().