From 4d6ebc8ca9b7f69ae17d1d089d4d620c38aecf98 Mon Sep 17 00:00:00 2001 From: jkratoch <> Date: Thu, 11 Jun 2009 19:23:32 +0000 Subject: [PATCH] +renice+ionice Fix exit code. --- bin/errs1 | 8 ++++++++ bin/errs2 | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/bin/errs1 b/bin/errs1 index 69fe5c1..65903c8 100755 --- a/bin/errs1 +++ b/bin/errs1 @@ -1,6 +1,8 @@ #! /bin/sh # $Id$ +renice +19 -p $$; ionice -c3 -p $$ + customss="--enable-static --disable-shared" customm="-m64" target= @@ -61,6 +63,7 @@ do break done +rm -f errs1.ok ( set -ex find -name config.cache|xargs rm -f @@ -117,4 +120,9 @@ done export LDFLAGS="$ldflags" time nice "$configure" $target $targets $customss --enable-debug $maintainer $werror "$@" + touch errs1.ok ) 2>&1|tee errs1 +test -f errs1.ok +rc=$? +rm -f errs1.ok +exit $rc diff --git a/bin/errs2 b/bin/errs2 index 2ba4f45..cd0da81 100755 --- a/bin/errs2 +++ b/bin/errs2 @@ -1,17 +1,30 @@ #! /bin/sh # $Id$ +renice +19 -p $$; ionice -c3 -p $$ + args="" if [ "$1" = "-a" ];then args="$args $1" shift fi +out=errs2 +if [ "$1" = "-n" ];then + out="$2" + shift 2 +fi j="" cpus="`getconf _NPROCESSORS_ONLN`" if [ -n "$cpus" ];then j="-j$[$cpus*3/2]" fi +rm -f $out.ok ( set -ex time nice make $j "$@" - ) 2>&1|tee $args errs2 + touch $out.ok + ) 2>&1|tee $args $out +test -f $out.ok +rc=$? +rm -f $out.ok +exit $rc -- 1.8.3.1