cgpt: Close stdout on exec'ing flashrom

flashrom spills out "Reading flash... SUCCESS" and so on to stdout. This
affects scripts calling to "cgpt". So this CL sets stdout to CLOEXEC
before exec'ing flashrom. It still leaves stderr and stdin unclosed.

BUG=None
BRANCH=None
TEST=cgpt show /dev/mtd0 2>/dev/null will not show any unnecessary text

Change-Id: Ide1414c56f63ffe8bc2385a797f166476dacd732
Reviewed-on: https://chromium-review.googlesource.com/242295
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Nam Nguyen <namnguyen@chromium.org>
Commit-Queue: Nam Nguyen <namnguyen@google.com>
1 file changed