From 62115d60d25ac6d50962feba114b5cc4566cadd6 Mon Sep 17 00:00:00 2001 From: herp Date: Mon, 26 Feb 2001 00:33:37 +0000 Subject: [lcd4linux @ 2001-02-26 00:33:37 by herp] fixed X11 signal handler git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@89 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- XWindow.c | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/XWindow.c b/XWindow.c index a40dbe9..59f2303 100644 --- a/XWindow.c +++ b/XWindow.c @@ -1,4 +1,4 @@ -/* $Id: XWindow.c,v 1.22 2001/02/13 09:00:13 reinelt Exp $ +/* $Id: XWindow.c,v 1.23 2001/02/26 00:33:37 herp Exp $ * * X11 Driver for LCD4Linux * @@ -20,6 +20,9 @@ * * * $Log: XWindow.c,v $ + * Revision 1.23 2001/02/26 00:33:37 herp + * fixed X11 signal handler + * * Revision 1.22 2001/02/13 09:00:13 reinelt * * prepared framework for GPO's (general purpose outputs) @@ -99,6 +102,7 @@ /* + * Mon Feb 26 02:07:52 MET 2001 fixed sighandler * Tue Apr 4 02:37:38 MET 2000 fixed a bug that caused pixelerrors under h/load * Sun Apr 2 22:07:10 MET 2000 fixed a bug that occasionally caused Xlib error * Sun Apr 2 01:32:48 MET 2000 geometric correction (too many pixelgaps) @@ -120,6 +124,7 @@ #include #include #include +#include #include #include #include @@ -197,8 +202,29 @@ static void shmcleanup() { } static void quit_updater() { - if (async_updater_pid>1) - kill(async_updater_pid,15); +int i; + if (async_updater_pid>1) { + i=async_updater_pid; + async_updater_pid=1; + kill(i,9); + waitpid(i,&i,0); + } +} + +static void sig_updater(int sig) { + kill(ppid,sig); + exit(0); +} + +static void init_signals() { +unsigned int ignsig=(1<