Signal

use sigaction instead signal, format code and correct log message.