Whamcloud - gitweb
Land b1_8_gate onto b1_8 (20081218_1708)
[fs/lustre-release.git] / lustre / tests / runmultiop_bg_pause
index 823ebdd..3450e64 100644 (file)
@@ -7,5 +7,12 @@ PTLDEBUG=${PTLDEBUG:--1}
 LUSTRE=${LUSTRE:-`dirname $0`/..}
 . $LUSTRE/tests/test-framework.sh
 
-multiop_bg_pause $*
-exit $?
+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