[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

bterm fix



I attached a patch to fix bterm. Please test the installation abort with
current trunk versions of cdebconf, main-menu, rootskel,
debian-installer-utils and a fixed bogl.

Without the patch, bterm always returns 0.

Bastian

-- 
There are always alternatives.
		-- Spock, "The Galileo Seven", stardate 2822.3
diff -ur bogl-0.1.18.old/bterm.c bogl-0.1.18/bterm.c
--- bogl-0.1.18.old/bterm.c	2004-05-06 04:57:06.000000000 +0200
+++ bogl-0.1.18/bterm.c	2004-07-08 13:09:41.000000000 +0200
@@ -123,11 +123,12 @@
 
 void sigchld(int sig)
 {
-  if (wait(0) == child_pid) {
+  int status;
+  if (waitpid(child_pid, &status, WNOHANG)) {
     child_pid = 0;
     /* Reset ownership and permissions of ttyfd device? */
     tcsetattr(0, TCSAFLUSH, &ttysave);
-    exit(0);
+    exit(di_exec_mangle_status(status));
   }
   signal(SIGCHLD, sigchld);
 }
diff -ur bogl-0.1.18.old/debian/changelog bogl-0.1.18/debian/changelog
--- bogl-0.1.18.old/debian/changelog	2004-05-06 04:57:06.000000000 +0200
+++ bogl-0.1.18/debian/changelog	2004-07-08 13:15:59.000000000 +0200
@@ -1,3 +1,9 @@
+bogl (0.1.18-1.0.di.1) UNRELEASED; urgency=low
+
+  * Return exit code from process.
+
+ -- Bastian Blank <waldi@debian.org>  Thu, 08 Jul 2004 13:15:58 +0200
+
 bogl (0.1.18-1) unstable; urgency=low
 
   * Work around 2.6.x vga16fb bugs (Closes: #245207).
diff -ur bogl-0.1.18.old/debian/control bogl-0.1.18/debian/control
--- bogl-0.1.18.old/debian/control	2003-11-05 06:30:11.000000000 +0100
+++ bogl-0.1.18/debian/control	2004-07-08 13:16:15.000000000 +0200
@@ -2,7 +2,7 @@
 Section: devel
 Priority: optional
 Maintainer: Daniel Jacobowitz <dan@debian.org>
-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, libpng3-dev, linux-kernel-headers (>= 2.5.999-test7-bk-7) [!hurd-i386], libdebian-installer-dev
 Standards-Version: 3.1.1
 
 Package: libbogl-dev
diff -ur bogl-0.1.18.old/Makefile bogl-0.1.18/Makefile
--- bogl-0.1.18.old/Makefile	2003-10-05 19:47:03.000000000 +0200
+++ bogl-0.1.18/Makefile	2004-07-08 14:22:41.000000000 +0200
@@ -79,7 +79,7 @@
 	$(CC) -DSTANDALONE_TEST $(ALLCFLAGS) bowl-boxes.c $(LIBOBJECTS) -o bowl-boxes
 
 bterm: $(LIB) bterm.o bogl-term.o bogl-bgf.o
-	$(CC) $+ $(LIB) -o bterm
+	$(CC) $+ $(LIB) /usr/lib/libdebian-installer.a -o bterm
 
 bdftobogl: $(LIBBOGLOBJECTS)
 %.c: %.bdf bdftobogl

Attachment: signature.asc
Description: Digital signature


Reply to: