+renice+ionice
authorjkratoch <>
Thu, 11 Jun 2009 19:23:32 +0000 (19:23 +0000)
committerjkratoch <>
Thu, 11 Jun 2009 19:23:32 +0000 (19:23 +0000)
Fix exit code.

bin/errs1
bin/errs2

index 69fe5c1..65903c8 100755 (executable)
--- 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
index 2ba4f45..cd0da81 100755 (executable)
--- 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