#include <libosso.h>
#endif
+#ifdef HAVE_SIGNAL_H
+ #include <signal.h>
+#endif
+
#define MIDORI_HISTORY_ERROR g_quark_from_string("MIDORI_HISTORY_ERROR")
typedef enum
}
}
+#ifdef HAVE_SIGNAL_H
+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 ();
+ }
+}
+#endif
+
int
main (int argc,
char** argv)
textdomain (GETTEXT_PACKAGE);
#endif
+ #ifdef HAVE_SIGNAL_H
+ signal (SIGHUP, &signal_handler);
+ signal (SIGINT, &signal_handler);
+ signal (SIGTERM, &signal_handler);
+ signal (SIGQUIT, &signal_handler);
+ #endif
+
/* Parse cli options */
webapp = NULL;
config = NULL;
conf.env['docs'] = option_enabled ('docs')
conf.check (header_name='unistd.h')
+ conf.check (header_name='signal.h')
if not conf.env['HAVE_UNIQUE']:
if Options.platform == 'win32':
conf.check (lib='ws2_32')