ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Here's a demonstration program that catches an interrupt signal; e.g., when a user tries to abort a program with CTRL-C or the delete key. By use setsig, sigsetjmp and siglongjmp the program cannot be killed by flooding it with interrupt signals (this is the sort of thing that you'd use to clean up files when an interrupt is received):