X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Futils%2Futils.sh;h=31087877d1639767086f88ed0821613f342c79f8;hp=574495704a83baa5f2ba30f273131495eef0f3f2;hb=00d1ff64c4c7a19cd9e8bd705d76c5834d6dd822;hpb=8db3acaf0eb2b0032c2ba25b038d37d166933fa6 diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 574495704..31087877d 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -100,7 +100,7 @@ function lttng_pgrep () while IFS= read -r pid ; do # /proc/pid/cmdline is null separated. - if full_command_no_argument=$(cut -d '' -f 1 < /proc/"$pid"/cmdline); then + if full_command_no_argument=$(cut -d '' -f 1 2>/dev/null < /proc/"$pid"/cmdline); then command_basename=$(basename "$full_command_no_argument") if grep -q "$pattern" <<< "$command_basename"; then echo "$pid"