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