diff options
author | Aaron Lu <aaron.lu@intel.com> | 2017-08-01 16:00:21 +0800 |
---|---|---|
committer | Fengguang Wu <fengguang.wu@intel.com> | 2017-08-03 09:53:13 +0800 |
commit | 567e0b1b70258d790065c5a0685b92c4eaaad119 (patch) | |
tree | 18c6e41f5409ed990943cce7fa0d5efc753b228e | |
parent | 67505517cd515758f7f9fbfd53dcfe1c45916bb6 (diff) | |
download | vm-scalability-567e0b1b70258d790065c5a0685b92c4eaaad119.tar.gz |
case-migrate: ignore error message from 'cat /proc/$pid/comm'
The process could be gone when we cat it, so ignore its error message or
we will have an useless stderr file:
==> /tmp/stderr <==
cat: /proc/10465/comm: No such file or directory
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
-rwxr-xr-x | case-migrate | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/case-migrate b/case-migrate index e944a50..b524eae 100755 --- a/case-migrate +++ b/case-migrate @@ -35,7 +35,7 @@ kill -INT $pid # the sleep is necessary for umount to succeed # it takes some time to kill the usemem process -while [ -d /proc/$pid -a "$(cat /proc/$pid/comm)" = 'usemem' ] +while [ -d /proc/$pid -a "$(cat /proc/$pid/comm 2>/dev/null)" = 'usemem' ] do sleep 0.1 done |