commit | eb18fbc3893495ad6c24815621cd30308423ebe5 | [log] [tgz] |
---|---|---|
author | Yilong Li <liyl@google.com> | Sat Nov 21 08:44:18 2020 +0000 |
committer | CQ Bot <commit-bot@chromium.org> | Sat Nov 21 08:44:18 2020 +0000 |
tree | af7f5e64e2ab7fd4d989015cb2dcc9519d7d42ae | |
parent | be326bbb644c253eae5225a055dd6c296927dd08 [diff] |
[fx][emu] Fix terminal check script for "stty sane". Previously we check if the shell contains option "-i" to determine whether the script is running in interactive mode, and only reset the terminal if script runs in interactive mode. However when we run "fx emu", though the script is running in non- interactive mode (because we spawn a new shell, instead of sourcing the script in the interactive shell), the input and output are both to a terminal; so the terminal still could be broken by QEMU, and thus we still need a "stty sane" command after QEMU quits. We fix this by changing the teriminal check script: we use "-t" test operator to check if stdin is associated with a terminal and only do stty sane when it is true. TEST=fx emu (stty sane called) fx emu-remote (stty sane not called; no error messages). Change-Id: Ie8ed877d7fe5db699e8b79e225bf53aa8773df47 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/453516 Reviewed-by: Wayne Piekarski <waynepie@google.com> Reviewed-by: Renato Mangini Dias <mangini@google.com> Testability-Review: Wayne Piekarski <waynepie@google.com> Commit-Queue: Yilong Li <liyl@google.com>
Pink + Purple == Fuchsia (a new operating system)
Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.
Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.