Replaced 'signal' with sigaction