signal handler in glut

How to implement a signal handler in glut? I found some infor about using glutIdleFunc with signal handler. How to do it?