For instance Windows has support for unix signals but only for
some of the signals.
static void
signal_handler (int signal_id)
{
- if (signal_id == SIGHUP || signal_id == SIGINT
- || signal_id == SIGTERM || signal_id == SIGQUIT)
- {
- midori_app_quit_cb (NULL);
- gtk_main_quit ();
- }
+ midori_app_quit_cb (NULL);
+ gtk_main_quit ();
}
#endif
#endif
#ifdef HAVE_SIGNAL_H
+ #ifdef SIGHUP
signal (SIGHUP, &signal_handler);
+ #endif
+ #ifdef SIGINT
signal (SIGINT, &signal_handler);
+ #endif
+ #ifdef SIGTERM
signal (SIGTERM, &signal_handler);
+ #endif
+ #ifdef SIGQUIT
signal (SIGQUIT, &signal_handler);
#endif
+ #endif
/* Parse cli options */
webapp = NULL;