use sigaction instead signal.