
Signal Handlers - Simple Example


        void
        sighdlr(int sig)
        {
                printf("signal %d received", sig);
        }

        int
        main(int argc, char *argv[])
        {
                signal(SIGHUP, sighdlr);
                signal(SIGUSR1, sighdlr);
        ...

so simple, can't be that bad, right?

