diff options
author | David Schneider <dnschneid@chromium.org> | 2017-09-19 15:19:13 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-11 03:11:09 +0000 |
commit | 947267c4fdc20ed2270c3ad72cb642b496de16c2 (patch) | |
tree | 7f0146765f9148ec83f2040d97496c7b047290d9 /util | |
parent | 54030fa0b37b509863b7fc0eb5a1c1e8ea4d040a (diff) | |
download | chrome-ec-947267c4fdc20ed2270c3ad72cb642b496de16c2.tar.gz |
util/flash_ec: filter fds out of pid list
crosbug.com/444931 naturally has me wanting to run flash_ec outside of
the chroot, which means potentially newer system utilities.
I don't know when exactly it changed, but somewhere between lsof version
4.85 (in the chroot) and version 4.89 (my system), lsof auto-selects the
fd field (labeled f) to always be output, which gets mixed in with the
PIDs and PPIDs the script wants.
Filtering out the f field allows the flash_ec tool to proceed as normal.
BRANCH=none
BUG=none
TEST=flashed an EC outside of the chroot
Change-Id: Iee6ee7dfb338ffae900ff8b4cc70d7a6c1afab22
Signed-off-by: David Schneider <dnschneid@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/673724
Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'util')
-rwxr-xr-x | util/flash_ec | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec index 2b985e275d..70de72000a 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -752,7 +752,7 @@ function claim_pty() { warn "hdctools cannot disconnect the EC-3PO interpreter from" \ "the UART." - pids=$(lsof -FR 2>/dev/null -- $1 | tr -d 'pR') + pids=$(lsof -FR 2>/dev/null -- $1 | grep -v '^f' | tr -d 'pR') FROZEN_PIDS="" # reverse order to SIGSTOP parents before children |