9

C + UNIX, siglongjmp and sigsetjmp

view full story
linux-howto

http://stackoverflow.com – I have a program from a (oldish) text book that is intended to illustrate the use of POSIX signals on UNIX. The program runs a computational loop to compute perfect numbers starting at a fixed point. A time alarm signal is used to periodically print status. An interrupt signal is used for status on demand. A quit signal is used to reset the test interval (or terminate). void perfect(int); sigjmp_buf jmpenv; /* environment saved by setjmp*/ int n; /* global variable indicating current test point */ int main() { int begin; /* starting point for next search*/ /* interrupt ro (HowTos)