
Signal Handlers - Possible Solutions


        int	quit = 0;

        void
        sigterm(int signal)
        {
                quit = 1;
        }

        int
        main(int argc, char *argv[])
        {
                signal(SIGTERM, sigterm);

                while (!quit) {
                       /* do something */
                       poll()
                       /* do something */
                }
        }


