mbox series

[kvmtool,0/2] Add terminal detach feature

Message ID 20190705095914.151056-1-andre.przywara@arm.com (mailing list archive)
Headers show
Series Add terminal detach feature | expand

Message

Andre Przywara July 5, 2019, 9:59 a.m. UTC
At the moment running a guest will tie it to the console where kvmtool
is running on. So one cannot logout of the terminal without killing the
guest. Existing workarounds are running in a terminal multiplexer like
screen or using the --tty option to detach kvmtool from the very
beginning.

Both of these solutions need to be invoked at guest creation time,
though. Patch 2 introduces a "detach" command, which can be invoked at
any point during the guest's runtime using the terminal escape sequence
("Ctrl+A d" by default). This will redirect the guest's serial output
to pseudo-terminals and detach the process from the console. More
details in the commit message.

Patch 1 contains a bugfix, which avoids the kvmtool terminal thread to
hog the full CPU time because poll() is not exactly doing what we think
it does.

Please have a look and comment!

Cheers,
Andre

Andre Przywara (2):
  term: Avoid busy loop with unconnected pseudoterminals
  Add detach feature

 builtin-run.c     |   3 +
 include/kvm/kvm.h |   2 +
 term.c            | 139 +++++++++++++++++++++++++++++++++++++++++++++-
 3 files changed, 141 insertions(+), 3 deletions(-)