Whamcloud - gitweb
Branch b1_8
authorw.li <w.li>
Thu, 16 Jul 2009 01:03:30 +0000 (01:03 +0000)
committerw.li <w.li>
Thu, 16 Jul 2009 01:03:30 +0000 (01:03 +0000)
b=19999
i=grev
i=johann

Remove PID reading from multiop_bg_pause.  Turn to $! for multiop PID in
runmultiop_bg_pause.  The result looks more consistent with HEAD.

lustre/tests/runmultiop_bg_pause
lustre/tests/test-framework.sh

index 3450e64..640cc29 100644 (file)
@@ -11,8 +11,7 @@ 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
+multiop_bg_pause $*
+rc=$?
+[ "$rc" = 0 ] && echo $! > $MULTIOP_PID_FILE
 exit $rc
index c5d35fe..e4cd153 100644 (file)
@@ -2315,9 +2315,8 @@ multiop_bg_pause() {
 
     echo "TMPPIPE=${TMPPIPE}"
     local multiop_output
-    local multiop_pid
 
-    read -t 60 multiop_output multiop_pid < $TMPPIPE
+    read -t 60 multiop_output < $TMPPIPE
     if [ $? -ne 0 ]; then
         rm -f $TMPPIPE
         return 1
@@ -2329,7 +2328,6 @@ multiop_bg_pause() {
         return 1
     fi
 
-    echo $multiop_pid
     return 0
 }