ia64/xen-unstable

view netbsd-2.0-xen-sparse/nbmake-xen @ 7238:971e7c7411b3

Raise an exception if an error appears on the pipes to our children, and make
sure that the child's pipes are closed even under that exception. Move the
handling of POLLHUP to the end of the loop, so that we guarantee to read any
remaining data from the child if POLLHUP and POLLIN appear at the same time.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Thu Oct 06 10:13:11 2005 +0100 (2005-10-06)
parents 0a4b76b6b5a0
children
line source
1 #! /bin/sh
2 # Set proper variables to allow easy "make" building of a NetBSD subtree.
3 # Generated from: $NetBSD: build.sh,v 1.126 2004/02/04 11:23:40 lukem Exp $
4 #
6 : ${HOS:=$(uname -s | tr /A-Z/ /a-z/)}
7 : ${HARCH:=$(uname -m 2>/dev/null || echo i386)}
8 : ${NETBSD_RELEASE:=$(basename $(cd $(dirname $0) && pwd) | sed 's/netbsd-\([0-9]\+\.[0-9]\+\).*/\1/')}
9 : ${NETBSD_VERSION:=$(basename $(cd $(dirname $0) && pwd) | sed 's/netbsd-\([0-9]\+\.[0-9]\+.*\)-xen.*/\1/')}
10 : ${TOPDIR:=$(cd $(dirname $0) && pwd | sed 's/\(netbsd-[0-9]\+\.[0-9]\+.*-xen[^/]*\)/\1/')}
12 case "$HARCH" in
13 i586|i686)
14 HARCH=i386
15 ;;
16 esac
18 NETBSDSRCDIR="$TOPDIR"; export NETBSDSRCDIR
19 DESTDIR="$TOPDIR/root"; export DESTDIR
20 unset MAKEOBJDIRPREFIX
21 MAKEOBJDIR='${.CURDIR:C,^'"$TOPDIR,$TOPDIR/obj,}"; export MAKEOBJDIR
22 RELEASEDIR="$TOPDIR/release"; export RELEASEDIR
23 MKUNPRIVED='yes'; export MKUNPRIVED
24 MAKEVERBOSE='1'; export MAKEVERBOSE
25 LC_ALL='C'; export LC_ALL
26 TOOLDIR="$TOPDIR/../netbsd-${NETBSD_RELEASE}-tools/$HOS-$HARCH"; export TOOLDIR
27 MACHINE='i386'; export MACHINE
28 MACHINE_ARCH='i386'; export MACHINE_ARCH
29 MAKEFLAGS="-de -m $TOPDIR/share/mk MKOBJDIRS=yes"; export MAKEFLAGS
30 BUILDID="${NETBSD_RELEASE}"; export BUILDID
31 USETOOLS=yes; export USETOOLS
33 exec "${TOOLDIR}/bin/nbmake" ${1+"$@"}