- global variable should be volatile - signal is deprecated, use sigaction instead - exit from the handler