diff options
author | Aseda Aboagye <aaboagye@google.com> | 2015-12-17 16:55:01 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-12-17 23:45:18 -0800 |
commit | 4bad633cb9ece35138415541a0decafda613a95f (patch) | |
tree | 15bd06ee85e188bcbd738cbd9267691dd3e82815 /test/inductive_charging.c | |
parent | 6a29ca187a22012a984808d76caaa339c85c5616 (diff) | |
download | chrome-ec-4bad633cb9ece35138415541a0decafda613a95f.tar.gz |
ec3po: Add graceful exit.
The console and interpreter are usually killed by KeyboardInterrupt
whether or not it's run standalone or by servod. This commit tries to
make the exit graceful by closing pipes, file descriptors, and exiting
each process.
BUG=chromium:570526
BRANCH=None
TEST=Run ec3po standalone and hit Ctrl+C to kill it. Observe no
traceback and no leftover processes.
TEST=Repeat above test, but inside servod
TEST=cros lint --debug util/ec3po/console.py
TEST=cros lint --debug util/ec3po/interpreter.py
TEST=python2 -b util/ec3po/console_interpreter.py
TEST=python2 -b util/ec3po/console_interpreter.py
Change-Id: Ia151b9ede8adf7f8dec6c07277f62d097c13e63e
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/319252
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'test/inductive_charging.c')
0 files changed, 0 insertions, 0 deletions