add sample code to catch signal handler in C++