Added a commnet to explain how the signal handler works.