modify signal handling.

Modify signal handling from asynchronous signal handler to synchronous signal handling thread.

To respect async-signal-safe.

This condition of if statement is different from the one in startup().
What do you want to check here?