App-MrShell
view release on metacpan or search on metacpan
my ($kid, $host, $cmdno, @c) = @{ $this->{_pid}{ $_[ARG1] } || return $this->_sigchld_exit_error(@_) };
# NOTE: this usually isn't an error, sometimes the sigchild will arrive
# before the handles are "closed" in the traditional sense. We get error
# eveents for errors.
#### # $this->std_msg($host, $cmdno, 0, RED.'-- error: unexpected child exit --');
# NOTE: though, the exit value may indicate an actual error.
if( (my $exit = $_[ARG2]) != 0 ) {
# XXX: I'd like to do more here but I'm waiting to see what Paul
# Fenwick has to say about it.
$exit >>= 8;
my $reset = RESET;
my $black = BOLD.BLACK;
my $red = RESET.RED;
$this->std_msg($host, $cmdno, 0, "$black-- shell exited with nonzero status: $red$exit$black --");
}
$_[KERNEL]->yield( stall_close => $kid->ID, 0 );
When expanding a host route, all C<%h> will be replaced with the elements of
the command array up to that escape, plus the hostname, for each host in the
hosts route.
This expansion also optionally (see B<-N> above) expands spaces and slashes to
escaped values compatible with openssh (L<http://openssh.com/>).
This is perhaps more clear by example.
Let's say this is the command in question.
ssh -o 'BatchMode Yes' %h 'ls -ald /tmp/'
And let's say our hostname is C<corky!wisp>, then the command becomes:
ssh -o 'BatchMode Yes' corky ssh -o 'Batchmode\ Yes' wisp 'ls\\ -ald\\ /tmp'
=item B<%u>
Replaced with the username, if applicable. When hostname contains an C<@>
character, for example C<jettero@corky>, the portion before the C<@> is
considered a username.
=item conditional replacement
( run in 1.261 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )