Whamcloud - gitweb
b=17229
authorgrev <grev>
Fri, 14 Nov 2008 16:23:24 +0000 (16:23 +0000)
committergrev <grev>
Fri, 14 Nov 2008 16:23:24 +0000 (16:23 +0000)
i=Adilger
remote multiop fix

lustre/tests/runmultiop_bg_pause

index aa6a666..3450e64 100644 (file)
@@ -7,8 +7,12 @@ PTLDEBUG=${PTLDEBUG:--1}
 LUSTRE=${LUSTRE:-`dirname $0`/..}
 . $LUSTRE/tests/test-framework.sh
 
-multiop_bg_pause $*
-pid=$!
-rc=$?
-echo "$pid" > /tmp/multiop_bg.pid
+TMP=${TMP:-/tmp}
+MULTIOP_PID_FILE=${MULTIOP_PID_FILE:-$TMP/multiop_bg.pid}
+rm -f $MULTIOP_PID_FILE
+
+pid=$(multiop_bg_pause $* | tail -1)
+rc=${PIPESTATUS[0]}
+
+[ "$rc" = 0 ] && echo $pid > $MULTIOP_PID_FILE
 exit $rc