App-MrShell
view release on metacpan or search on metacpan
}
# }}}
# _close {{{
sub _close {
my $this = shift;
my ($wid, $count) = @_[ ARG0, ARG1 ];
return unless $this->{_wid}{$wid}; # sometimes we'll get a sigchild *and* a close event
# NOTE: I was getting erratic results with some fast running commands and
# guessed that I was sometimes getting the close event before the stdout
# event. Waiting through the kernel loop once is probably enough, but I
# used 3 because it does't hurt either.
if( $count > 3 ) {
my ($kid, $host, $cmdno, $lineno, @c) = @{ delete $this->{_wid}{$wid} };
$this->std_msg($host, $cmdno++, 0, BOLD.BLACK.'-- eof --') if $$lineno == 0;
if( @c ) {
$this->start_queue_on_host($_[KERNEL] => $host, $cmdno, @c);
$this->std_msg($host, $cmdno, 0, BOLD.BLACK."-- starting: @{$c[0]} --");
( run in 0.244 second using v1.01-cache-2.11-cpan-748bfb374f4 )