Commit 97f8827a authored by Steven Rostedt (Red Hat)'s avatar Steven Rostedt (Red Hat) Committed by Steven Rostedt

ftracetest: Use proper logic to find process PID

Half of the test in instance-event.tc was updated to use $! to find the PID
of the previous background process that was launched, but the second part of
the test still used the parsing of "jobs", which does not work on all shells
like $! does.
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 8329e818
...@@ -92,28 +92,23 @@ instance_slam() { ...@@ -92,28 +92,23 @@ instance_slam() {
} }
instance_slam & instance_slam &
x=`jobs -l` p1=$!
p1=`echo $x | cut -d' ' -f2`
echo $p1 echo $p1
instance_slam & instance_slam &
x=`jobs -l | tail -1` p2=$!
p2=`echo $x | cut -d' ' -f2`
echo $p2 echo $p2
instance_slam & instance_slam &
x=`jobs -l | tail -1` p3=$!
p3=`echo $x | cut -d' ' -f2`
echo $p3 echo $p3
instance_slam & instance_slam &
x=`jobs -l | tail -1` p4=$!
p4=`echo $x | cut -d' ' -f2`
echo $p4 echo $p4
instance_slam & instance_slam &
x=`jobs -l | tail -1` p5=$!
p5=`echo $x | cut -d' ' -f2`
echo $p5 echo $p5
ls -lR >/dev/null ls -lR >/dev/null
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment