Hi Dan,

I've prepared a zero-day NMU for this RC bug as part of the ongoing bug
squashing party.  While I'm at it, I've applied the patch from bug #379708,
which has been well-tested in Ubuntu for some time and brings the bogl
package completely back in sync between Debian and Ubuntu.

Please find the diff attached.  The NMU will be uploaded to incoming
shortly.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
[EMAIL PROTECTED]                                     [EMAIL PROTECTED]
diff -Nru bogl-0.1.18/bterm.c bogl-0.1.18/bterm.c
--- bogl-0.1.18/bterm.c	2004-07-22 03:39:42.000000000 -0700
+++ bogl-0.1.18/bterm.c	2008-03-08 03:11:21.000000000 -0800
@@ -64,6 +64,7 @@
 
 static int child_pid = 0;
 static struct termios ttysave;
+static int quit = 0;
 
 /* This first tries the modern Unix98 way of getting a pty, followed by the
  * old-fashioned BSD way in case that fails. */
@@ -139,6 +140,11 @@
   signal(SIGCHLD, sigchld);
 }
 
+void sigterm(int sig)
+{
+	quit = 1;
+}
+
 void spawn_shell(int ptyfd, int ttyfd, const char *command)
 {
   fflush(stdout);
@@ -288,6 +294,7 @@
   spawn_shell(ptyfd, ttyfd, command == NULL ? "/bin/sh" : command);
 
   signal(SIGHUP, reload_font);
+  signal(SIGTERM, sigterm);
 
   ntio = ttysave;
   ntio.c_lflag &= ~(ECHO|ISIG|ICANON|XCASE);
@@ -304,6 +311,9 @@
   for (;;) {
     fd_set fds;
     int max = 0;
+
+    if (quit)
+	    break;
     
     if(pending)
     {
@@ -321,6 +331,10 @@
     if (ptyfd > max)
       max = ptyfd;
     ret = select(max+1, &fds, NULL, NULL, &tv);
+
+    if (quit)
+	    break;
+
     if (bogl_refresh) {
       /* Handle VT switching.  */
       if (bogl_refresh == 2)
@@ -360,4 +374,6 @@
       }
     }
   }
+
+  return 0;
 }
diff -Nru /tmp/GiIfyMYDM5/bogl-0.1.18/debian/changelog /tmp/slLyOYIBrq/bogl-0.1.18/debian/changelog
--- bogl-0.1.18/debian/changelog	2006-10-20 13:10:30.000000000 -0700
+++ bogl-0.1.18/debian/changelog	2008-03-08 03:11:10.000000000 -0800
@@ -1,3 +1,17 @@
+bogl (0.1.18-1.6) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for RC bugfix.
+  * Drop versioned build-dependency on linux-kernel-headers, which is
+    build-essential in sarge and etch at the required version, and a virtual
+    package in lenny and above.  Closes: #433273.
+  * Also build-depend on libpng12-dev instead of libpng3-dev.
+  * Add a SIGTERM signal handler which allows for a graceful exit,
+    restoring the vt state; thanks to Matt Zimmerman <[EMAIL PROTECTED]>.
+    Closes: #379708.
+
+ -- Steve Langasek <[EMAIL PROTECTED]>  Sat, 08 Mar 2008 11:03:28 +0000
+
 bogl (0.1.18-1.5) unstable; urgency=low
 
   * NMU
diff -Nru /tmp/GiIfyMYDM5/bogl-0.1.18/debian/control /tmp/slLyOYIBrq/bogl-0.1.18/debian/control
--- bogl-0.1.18/debian/control	2003-11-04 21:30:11.000000000 -0800
+++ bogl-0.1.18/debian/control	2008-03-08 03:01:33.000000000 -0800
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Daniel Jacobowitz <[EMAIL PROTECTED]>
-Build-Depends: debhelper (>= 2), libgd2-noxpm-dev | libgd2-xpm-dev, libpng3-dev, linux-kernel-headers (>= 2.5.999-test7-bk-7) [!hurd-i386]
+Build-Depends: debhelper (>= 2), libgd2-noxpm-dev | libgd2-xpm-dev, libpng12-dev
 Standards-Version: 3.1.1
 
 Package: libbogl-dev

Reply via email to