App-FuguVM
view release on metacpan or search on metacpan
lib/App/FuguVM/Console.pm view on Meta::CPAN
return $self->_expect( $script, $config->{autoinstall_url},
$config->{arch} );
}
# $self->attach:
# Attach the terminal of the caller to this console, with
# telnet(1). The method returns the exit code of telnet(1).
#
# The guest never closes the console, so no end of file ends the
# attachment. The operator ends it with the telnet escape key,
# Ctrl-], and then 'quit'. telnet(1) leaves the terminal raw
# when a signal kills it, so the method saves the terminal
# attributes first and restores them on every exit path. The
# restore is idempotent. A signal that kills the tool also ends
# telnet(1), so no raw orphan keeps the terminal.
sub attach ($self)
{
# POSIX loads lazily, as App::FuguVM::Guest already does it.
require POSIX;
lib/App/FuguVM/Console.pod view on Meta::CPAN
default.
=head2 attach
$console->attach
Attach the terminal of the caller to this console, with L<telnet(1)>.
The method returns the exit code of telnet(1).
The guest never closes the console, so no end of file ends the
attachment. The operator ends it with the telnet escape key,
C<Ctrl-]>, and then C<quit>. The method saves the terminal attributes
of standard input first, and it restores them on every exit path, the
signal path included, because telnet(1) leaves the terminal raw when
a signal kills it. A signal that kills the tool also ends telnet(1),
so no raw orphan keeps the terminal.
The console takes one client. An installation and C<fuguvm expect>
each hold the same port, so an operator must not attach while one
runs.
man/fuguvm/fuguvm.1 view on Meta::CPAN
with
.Xr telnet 1 ,
at the connect address of the guest:
the
.Ar bind_address ,
or
.Li 127.0.0.1
when the ports bind to
.Li 0.0.0.0 .
The guest never closes the console.
End the session with the telnet escape key,
.Ql Ctrl-\&] ,
and then
.Ic quit .
The tool restores the terminal on every exit path.
.Pp
The console takes one client.
An installation and
.Cm expect
each hold the same port,
so do not attach while one runs.
( run in 2.322 seconds using v1.01-cache-2.11-cpan-54e63673c56 )