[gegl] Do not handle signals in "gegl:display"
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Do not handle signals in "gegl:display"
- Date: Sat, 7 Aug 2010 08:03:55 +0000 (UTC)
commit 1f3d764f87518f3f5c6173c91a0d92907b56d509
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Aug 7 10:00:27 2010 +0200
Do not handle signals in "gegl:display"
Do not handle signals in "gegl:display", rely on default behavior
(Ctrl+C still works for me). If explicit signal handling is still
needed, that should happen in the gegl binary anyway.
operations/external/display.c | 25 +------------------------
1 files changed, 1 insertions(+), 24 deletions(-)
---
diff --git a/operations/external/display.c b/operations/external/display.c
index a8278e4..d796339 100644
--- a/operations/external/display.c
+++ b/operations/external/display.c
@@ -40,26 +40,6 @@ gegl_chant_int(height, "", 0, 1000, 0, "private")
#include "gegl-chant.h"
#include <SDL.h>
-#include <signal.h>
-
-#ifdef G_OS_WIN32
-#ifndef SIGQUIT
-#define SIGQUIT 3
-#endif
-#endif
-
-static void
-sighandler (int signal)
-{
- switch (signal)
- { /* I want my ctrl+C back! :) */
- case SIGINT:
- case SIGTERM:
- case SIGQUIT:
- exit (0);
- break;
- }
-}
static void
init_sdl (void)
@@ -70,9 +50,6 @@ init_sdl (void)
{
inited = 1;
- /*signal (SIGINT, sighandler);
- signal (SIGQUIT, sighandler);*/
-
if (SDL_Init (SDL_INIT_VIDEO) < 0)
{
fprintf (stderr, "Unable to init SDL: %s\n", SDL_GetError ());
@@ -93,7 +70,7 @@ static gboolean idle (gpointer data)
switch (event.type)
{
case SDL_QUIT:
- sighandler (SIGQUIT);
+ exit (0);
}
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]