diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index 4a61ef052d4..0535469b769 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1413,7 +1413,7 @@ function run_in_background() { shift; # Execute the command and prepend the output with its pid # We enforce to return the exit status of the command and not the awk one. - ("$@" |& awk '{ a[i++] = $0 }END{for (i = 0; i in a; ++i) { print PROCINFO["pid"] ": " a[i]} }'; return ${PIPESTATUS[0]}) & + ("$@" |& awk '{ a[i++] = $0 }END{for (i = 0; i in a; ++i) { print "'$$': " a[i]} }'; return ${PIPESTATUS[0]}) >&2 & eval "$pid_variable+=\" $!\"" }