NAME
Data::AnyXfer::Elastic::Import::SpawnTask::Remote::Host - represents a spawned import task process on a remote host
DESCRIPTION
Used by Data::AnyXfer::Elastic::Import::SpawnTask::Remote to represent a target remote host.
METHODS
process_alive
if ( $host->process_is_alive($pid) ) { }
Check whether the process is still alive on the host.
wait_for_process
$host->wait_for_process($pid);
Blocks until the process finishes on the host.
terminate_process
$host->terminate_process($pid);
Attempts to terminate the process on the target host. It will try SIGHUP
, SIGQUIT
, SIGINT
, and SIGKILL
, once a second in turn (maximum try count is 5), before giving up.
run
$host->run(0, qw(bash -c env));
Runs the specified command on the remote host. Command can be supplied as a list for correct shell quoting (similar to system).
The first argument when true connects the commands STDOUT and STDERR to the current process.
COPYRIGHT
This software is copyright (c) 2019, Anthony Lucas.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.