Check and use sigaction, fix bug signal_s define and type compare warnning.

bug of signal_s type define from commit  bb9792a5.